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
Normal Topic Perplexed by #includes not working... (Read 3466 times)
JimR
Newbies
*
Offline


Posts: 2
Joined: Jan 6th, 2016
Perplexed by #includes not working...
Jan 6th, 2016 at 4:42pm
Print Post  
Hello, this is intensely frustrating:  If I use a project that works perfectly fine in Arduino 1.6.6, I get a raft of errors where visual studio/micro cannot find the include path.  To make it work, I have to prepend my includes with a subfolder name (which then makes it *not* work in Arduino).

I have tried to Add the library  from the Visual Micro menu, which dutifully places normal looking #includes in my file, but they are then not found and cannot compile.

If I can get the IDE to not bark at me by manually adjusting paths, I then also end up with a lot of linker errors with less than helpful output, that ends with:

collect2.exe: error: ld returned 1 exit status


Am I missing something?  This seems like includes should be pretty straightforward concept.  Any suggestions would be welcome.

I like the concept of this extension since I'm a professional developer and use Visual Studio day in and day out for C++ and C#, but find this cryptic partial support maddening.
« Last Edit: Jan 6th, 2016 at 4:43pm by JimR »  
Back to top
 
IP Logged
 
RayLivingston
Full Member
***
Offline


Posts: 158
Location: California
Joined: Nov 24th, 2012
Re: Perplexed by #includes not working...
Reply #1 - Jan 6th, 2016 at 5:08pm
Print Post  
It *should* work just like in the Arduino IDE, unless you're taking advantage of VisualMicros support for subdirectories.  Personally, I've never had a problem.  You'll have to provide example code to demonstrate the problem if you want help fixing it.

Regards,
Ray L.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Perplexed by #includes not working...
Reply #2 - Jan 6th, 2016 at 5:14pm
Print Post  
Hi Jim,

Ray is right. There should be no include paths required. Same as Arduino and it would be useful to have an example.

I am going to guess (maybe wrong) that you are talking about user library paths. If so then it is important that you have not set a "Sketchbook" path in the Visual Micro Ide Locations. This will ensure the default of documents\arduino for the path and user libs will then be found in document\arduino\libraries.

If you change the sketchbook in the arduino ide then visual micro will detect that change the next time it starts. This would ensure the same compilation conditions as you have within the arduino ide. However as a new user please leave empty until it the workings of Arduino are understood.

Hope to have an example of hear the confusion is resolved.

  
Back to top
WWW  
IP Logged
 
JimR
Newbies
*
Offline


Posts: 2
Joined: Jan 6th, 2016
Re: Perplexed by #includes not working...
Reply #3 - Jan 6th, 2016 at 5:28pm
Print Post  
Hello Tim,
It may be the Sketchbook path issue.  In IDE location that was set to my actual sketchbook location.  When I leave it blank it now seems to work.

Thanks for the quick response.

--Jim
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint