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 #Include fails after May Upgrade - Workaround (Read 3516 times)
K S
Junior Member
**
Offline


Posts: 10
Joined: Dec 14th, 2015
#Include fails after May Upgrade - Workaround
May 29th, 2016 at 3:21pm
Print Post  
I started using visual micro in Dec.  I have a few small projects.

This week I upgraded VM.  Now the INCLUDE directives in existing projects fail - even for header files in the same folder as the .ISO and .CPP files.

I found two workarounds.
1. (not preferred) Use absolute pathnames in the #include "..."  directives
2. (preferred) Created a new project.  Copy the source files.  #include <> and "" work as expected.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: #Include fails after May Upgrade - Workaround
Reply #1 - May 29th, 2016 at 3:33pm
Print Post  
Hi,

It sounds like the header exists on disk but are not included in the project.

You can switch off this feature and force all files to be compiled but it is usually better that the source expected to be compiled is "Included" in the project tree. There are other beenfits to working this way but will leave for another time. 

The solution explorer/project tree has two views. 1) shows files on disk 2) shows files actually included in the project.

Can you please show a screen image of the solution tree when the project is open.

Thanks

« Last Edit: May 29th, 2016 at 3:35pm by Tim@Visual Micro »  
Back to top
IP Logged
 
K S
Junior Member
**
Offline


Posts: 10
Joined: Dec 14th, 2015
Re: #Include fails after May Upgrade - Workaround
Reply #2 - May 29th, 2016 at 6:14pm
Print Post  
The project is small enough I can attach it.  
In the .vcxproj file, you can see at line 82 the .h file is included.:
  <ItemGroup>
    <ClInclude Include="LED_Utils.h" />


I don't need you to fix this - I have created a new project.  I am raising the issue so you can understand what seems to be an unfortunate side effect of the upgrade.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: #Include fails after May Upgrade - Workaround
Reply #3 - May 29th, 2016 at 10:10pm
Print Post  
Thanks for the zip

I changed:-
#include <LED_Utils.h>

to:-
#include "LED_Utils.h"

I test with the Arduino Ide and it also throws an error with <LED_Utils.h>. 

Visual micro was changed to work the same way as the arduino ide when previously the current project path was passed as a compiler -I include. It would be an option if people think it's a useful feature but normally anything outside of how arduino works can lead to other confusions.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint