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) vmbuild does not find include file for shared project (Read 1415 times)
revvers
Junior Member
**
Offline


Posts: 31
Joined: Sep 11th, 2023
vmbuild does not find include file for shared project
Aug 7th, 2024 at 1:10am
Print Post  
I would like to use vmbuild in a Jenkins pipeline. 
I execute the following:

Code
Select All
F:\JenkinsWorkspaces\Predict96_Nightly_Build\PumpControllerFirmware>"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" erFirmware\PumpControllerFirmware.vcxproj" -builder.build=true
Compiling 'PumpControllerFirmware' for 'Arduino UNO R4 Minima (minima)'

erFirmware.ino:145:10: fatal error: CommandMessage.h: No such file or directory
:#include <CommandMessage.h>
:^~~~~~~~~~~~~~~~~~


        An error was encountered during the 'Deep Search' library discovery process.
End
Build failed for project 'PumpControllerFirmware'
Press any key to continue. 



CommandMessage.h exists in a shared project. In Visual Studio, the solution builds, loads and runs without issue.
The solution is laid out in the attached image.
« Last Edit: Aug 8th, 2024 at 3:51pm by revvers »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vmbuild does not find include file for shared project
Reply #1 - Aug 7th, 2024 at 3:34pm
Print Post  
Can you please build in the IDE with vMicro>Compiler>Verbose enabled so that we can see the config.

Also show an image of the "References" node expanded below the arduino project (you see it when not viewing all files). Alternatively show project references in the project properties.
« Last Edit: Aug 7th, 2024 at 3:53pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vmbuild does not find include file for shared project
Reply #2 - Aug 8th, 2024 at 8:06pm
Print Post  
Thanks for sending the project file. Please also confirm the build command that you are using.

  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 31
Joined: Sep 11th, 2023
Re: vmbuild does not find include file for shared project
Reply #3 - Aug 8th, 2024 at 8:22pm
Print Post  
This was posted in the original post - although it looks like it poorly formatted. I tried to edit the original post but it seems to only make matters worse.

Code
Select All
"C:\Program Files\VMicro\VMBuilder\VMBuild.exe" erFirmware\PumpControllerFirmware.vcxproj" -builder.build=true 



And there is no "Update Session" button as far as I can tell, unfortunately.
Also, I'm not sure how to "confirm the project has been saved with the reference before trying to build with the VMBuilder".
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vmbuild does not find include file for shared project
Reply #4 - Aug 8th, 2024 at 8:28pm
Print Post  
Thanks, yes just checking it hasn't changed. We will try with both shared libraries and shared project code to see if that is the issue.

If you haven't edited the adafruit library code then you could try removing the two library references and then click on the project and save. The try the cli.

Obviously we will fix any issue, but it might be quicker way for you to get it working.
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 31
Joined: Sep 11th, 2023
Re: vmbuild does not find include file for shared project
Reply #5 - Aug 8th, 2024 at 9:36pm
Print Post  
I removed the Adafruit_BUSIO and Adafruit_FRAM_SPI references from the References section in the project, saved, and compiled successfully in the IDE. I then ran the same VMBuild CLI command and got the same results:

Code
Select All
Compiling 'PumpControllerFirmware' for 'Arduino UNO R4 Minima (minima)'

C:\Users\messee30606\source\repos\Revvity\Predict 96\PumpController\PumpControllerFirmware\PumpControllerFirmware.ino:145:10: fatal error: CommandMessage.h: No such file or directory
:#include <CommandMessage.h>
:^~~~~~~~~~~~~~~~~~
 



However, there is a tip now:

Code
Select All
Tip: The library searcher cache has been cleared. Try building again to see if that resolves the missing #includes. 



Building 1+ times does not seem to fix the issue.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vmbuild does not find include file for shared project
Reply #6 - Aug 9th, 2024 at 7:18pm
Print Post  
We have resolve this issue. The default for new installs was to exclude shared projects unless a property was set. The default is now ON for shared projects.

Please grab the latest. Thanks for the report.
  
Back to top
IP Logged
 
revvers
Junior Member
**
Offline


Posts: 31
Joined: Sep 11th, 2023
Re: vmbuild does not find include file for shared project
Reply #7 - Aug 10th, 2024 at 1:30am
Print Post  
Success!

I was able to build locally. Unfortunately, our trial license expired on the build server, so I will have to wait to confirm it works in our CI pipeline until we purchase another license.

Thank you very much for your help!!

What exactly does this mean:
Quote:
The default for new installs was to exclude shared projects unless a property was set.

Is this a CLI flag or setting?

Also, is there a way to turn off the 'Press any key to continue.' prompt? Remember, this is going in a CI pipeline.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12186
Location: United Kingdom
Joined: Apr 10th, 2010
Re: vmbuild does not find include file for shared project
Reply #8 - Aug 10th, 2024 at 2:15am
Print Post  
The include shared library property can be configured from various sources. One of our build machines had it switched on.

To close after build add this property:-

-builder-close=true


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