Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Error using Adafruit BMP085 Library - works in IDE (Read 10628 times)
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Error using Adafruit BMP085 Library - works in IDE
Jun 3rd, 2014 at 6:37pm
Print Post  
Hello People.
Finally, i've got my Arduino in VS2013 thanks to this plugin. 
I've made a small test program, working correctly.

But when trying to use the Adafruit Sensor library from VS i get the following errors:

Code
Select All
Compiling 'øø' for 'Arduino Mega 2560 or Mega ADK'
core.a(main.cpp.o)*:In function `main'
main.cpp:undefined reference to `setup'
main.cpp:undefined reference to `loop'
Error creating .elf
 



The same code works perfectly in the IDE 1.05...
What can be wrong? i've tried to make a clean build, delete temp folder under AppData....
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #1 - Jun 3rd, 2014 at 6:47pm
Print Post  
Hi Razz,

Yes that's a strange error. Please zip and email the sketch to info[at]visualmicro.com

This error would normally indicate the setup() and loop() are missing from the [sketch].ino.

However the file name might also be causing a problem for Visual Micro so I would like to inspect the code and the sketch sources.

Thanks
  
Back to top
IP Logged
 
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #2 - Jun 3rd, 2014 at 7:19pm
Print Post  
Tim@Visual Micro wrote on Jun 3rd, 2014 at 6:47pm:
Hi Razz,

Yes that's a strange error. Please zip and email the sketch to info[at]visualmicro.com

This error would normally indicate the setup() and loop() are missing from the [sketch].ino.

However the file name might also be causing a problem for Visual Micro so I would like to inspect the code and the sketch sources.

Thanks


After some struggling around i've got it working... tryed to create a new project, then it worked... Hmmm.... strange - then next time i open it it doesn't work again... strange.... I've sended you the project as a zip file... 

EDIT:
Seems like if i create another .ino file in my project, copy the exact same code to that .ino, the compilation is ok - after that i can compile my primary .ino file... 
« Last Edit: Jun 3rd, 2014 at 7:25pm by Razz »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #3 - Jun 3rd, 2014 at 7:36pm
Print Post  
Hi,

You have sent the temp build folder resulting from compile and have not sent the sketch/project source

Please zip and send the source code.

Thanks
  
Back to top
IP Logged
 
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #4 - Jun 3rd, 2014 at 7:41pm
Print Post  
I can't get the compiler to create that error any more... i will try and make the error, then i will send you the project asap Smiley Thanks for the help so far Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #5 - Jun 3rd, 2014 at 7:43pm
Print Post  
ok thanks for the update

edit: sometimes people open the [sketch].cpp from the temp build folder by mistake. Editing the temp build files by mistake might cause this type of confusion. maybe not in your case but worth mentioning.
« Last Edit: Jun 4th, 2014 at 2:51pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #6 - Jun 5th, 2014 at 6:29pm
Print Post  
I thing i've found how the problem occoured...
If i open a new project, and start typing all my code i get the compiler error. But, if i then add another .ino file to my project, and copy it all to this one - it works.... Do i need to have more than one .ino?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #7 - Jun 5th, 2014 at 6:43pm
Print Post  
No you only need one. I'll do some testing but need a bit more info

When you add a file or a library etc. the project is saved. When the project is saved Visual Micro does re-write some internal stuff for vs. The create is also supposed to save. 

How are you creating your projects? What do you click?

Thanks

  
Back to top
IP Logged
 
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #8 - Jun 5th, 2014 at 6:48pm
Print Post  
Okay, here's what i do:
Open VS2013 Prof.
Click New "Sketch Project"

name it somethin

It opens up, then i expand the project, double click the .ino file, write my code and click save, then compile... then i get the error....

If i then in the same project adds another .ino file it works
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #9 - Jun 5th, 2014 at 7:00pm
Print Post  
Okay thanks. Questions...

1) When I create a new sketch, both the project and the .ino are automatically opened by visual micro. Maybe there is some error being hit which halts this process. Please switch on tools>options>visual micro>user interface>trace. 

Then restart vs2013 and create a sketch. Immediately after the new sketch has opened please copy the contents of the trace that will appear in the output window area. Email to info[at]visualmicro.com

2)

Where are the new sketches created? In the usual document/arduino folder?

3)

What happens if you click "file>save all" after creating the new project?

4)

Are you working with one project per solution in this test or is the new project feature being used to add additional projects to an existing solution?

Thanks
« Last Edit: Jun 5th, 2014 at 7:00pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Razz
Newbies
*
Offline


Posts: 6
Joined: Jun 3rd, 2014
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #10 - Jun 5th, 2014 at 7:08pm
Print Post  
2 - Created in desktop\arduino.

3 - then i got it working

4 - nope, only one project.... Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12189
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error using Adafruit BMP085 Library - works in IDE
Reply #11 - Jun 5th, 2014 at 8:11pm
Print Post  
Hi,

Thanks for the email. Actually I see the sketch is created in "\Desktop\Homeserver.py\Arduino"?

Please try again but this time, for this test only, select a folder without a . in the name

For example document/arduino or c:\arduino\test

Does this make a difference?

Thanks
« Last Edit: Jun 5th, 2014 at 8:12pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint