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 Unresolved functions / not including files in CPP (Read 1806 times)
Rich R
Junior Member
**
Offline


Posts: 31
Joined: Mar 2nd, 2016
Unresolved functions / not including files in CPP
Feb 6th, 2018 at 3:56am
Print Post  
I am having a problem where a function in a file added to the project as a new INO file will not resolve when linked, even though I have identified it in the project (see attached file).  When I looked at the CPP file, the declaration is not included, nor the source.  Yet it's in the build list as _aThermistor.ino.

I have seen other posts which mention some issues on prioritization of including source files before compilation, which is why I used _ as a file prefix.  I can drop the function in an existing file and it resolves just fine.  I've also tried to rename the INO but no luck.

Any ideas?  I can add the function to existing files but they are getting pretty big and cumbersome.   

Thanks,
Rich
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Unresolved functions / not including files in CPP
Reply #1 - Feb 6th, 2018 at 9:56pm
Print Post  
If you close and re-open the IDE does that resolve the issue?
  
Back to top
WWW  
IP Logged
 
Rich R
Junior Member
**
Offline


Posts: 31
Joined: Mar 2nd, 2016
Re: Unresolved functions / not including files in CPP
Reply #2 - Feb 9th, 2018 at 5:02pm
Print Post  
Actually I solved it another way (restart didn't help).  Turns out when you use the "Add new INO file" to the project, it does add it but sets the "exclude from build" flag to undefined "no entry"  Therefore, as far as VM is concerned, there is nothing to add into the CPP file before compilation - it doesn't exist.

This also explains why adding the function definition manually in the main INO file didn't matter - there was no code which resolved to the declaration.

This is a bug/feature that i think should be changed.    I only stumbled on this after much work, to overcome something i think is intuitive.  If I add an INO to a project, it seems natural it would be included in the build?????

Rich
« Last Edit: Feb 9th, 2018 at 5:02pm by Rich R »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint