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 VMBuild: Unable to build VC2015 project. (Read 2017 times)
TVC
Junior Member
**
Offline


Posts: 12
Joined: Dec 19th, 2016
VMBuild: Unable to build VC2015 project.
Aug 13th, 2018 at 4:58pm
Print Post  
Hello VM Forum.

I am trying to do a command line build of a VC2015 project, however, the build fails to find include files associated with the project.

After some experimentation it seems the issue occurs only when doing a rebuild (or a build after the project has been cleaned) and that the IDE level settings (e.g. do not deep search includes) are not being used. I build from VC2015 using the "No IDE" option and everything works fine there.

The solution has multiple projects within it and a shared project as well for some common components. I want to build any one or all of them from the command line.

I tried changing the IDE path to the path to my VC2015 install and got a different error: 

The operation failed with exception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


The latest comamnd line attempted is:

.\VMBuild.exe -builder.verbose=true -builder.build=true -builder.rebuild=true -builder.upload=false -builder.board_id=konekt_dash -builder.project_path="F:\Src\MySolution\Proj1.vcxproj" -builder.output_directory="F:\Src\MySolution\builds" -builder.ide_path="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"

I also tried building using the SLN file (with the default IDE location) which got a bit further then failed with the message:

Error linking for board Dash
End
F:\Src\MySolution\core.a(main.cpp.o):In function main
\arduino\main.cpp:undefined reference to setup
\arduino\main.cpp:undefined reference to loop


Any thoughts on how to get this working?

Thanks,
tvcjr
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild: Unable to build VC2015 project.
Reply #1 - Aug 13th, 2018 at 5:36pm
Print Post  
Try switching off "vmicro>compiler>shared core" 
Out of interested what is checked on the vmicro>compiler menu?


The ide_path does not relate to visual studio. it is expects and arduino ide path.

-builder.ide_path="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE" but I doubt it is used for the core you are using.

« Last Edit: Aug 13th, 2018 at 5:37pm by Tim@Visual Micro »  
Back to top
IP Logged
 
TVC
Junior Member
**
Offline


Posts: 12
Joined: Dec 19th, 2016
Re: VMBuild: Unable to build VC2015 project.
Reply #2 - Aug 13th, 2018 at 6:13pm
Print Post  
Thanks for the reply.

Shared core option was off. The full list of complier options is as follows:

[ ] Deep Search for Libraries
[ ] Local Files Override Library Files 
[x] Verbose
[x] High Speed Parallel Builds
[x] Warnings for Project
[ ] Warnings for Libraries
[ ] Warnings for Core
[x] Stop on Error
[ ] Show Build Folder
[x] Show Build Properties
[ ] Shared Cache for Cores
[ ] Always Copt To Intermediate
[x] Always Export Binary



I set the build path back to the proper Arduino install location for my environment...

.\VMBuild.exe -builder.verbose=true -builder.build=true -builder.rebuild=true -builder.upload=false -builder.board_id=konekt_dash -builder.project_path="F:\Src\MySolution\Proj1.vcxproj" -builder.output_directory="F:\Src\MySolution\builds" -builder.ide_path="F:\Arduino"

...the build still cannot find include files (i.e. No such file or directory.) The include file is part of the shared code project within the solution.

When the command line build executes, it does a deep search for includes even though that option is not selected which is why I thought the IDE level settings were not being used/found.
Also any configuration or project defines (and I assume any settings on the project properties page) are also not used/found.

Building by specifying the solution file fails as before (at the link phase).

Which is preferred, specifiying the SLN file or the specific VCXPROJ files within the SLN?
  
Back to top
 
IP Logged
 
TVC
Junior Member
**
Offline


Posts: 12
Joined: Dec 19th, 2016
Re: VMBuild: Unable to build VC2015 project.
Reply #3 - Aug 14th, 2018 at 8:32pm
Print Post  
The attached ZIP file is a simple VS 2015 solution that replicates the issues described above.

Included in the ZIP is a batch file that shows the command line used to attempt builds. You may need to tweak the paths to get it working in another environment.

Thoughts?
  

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


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: VMBuild: Unable to build VC2015 project.
Reply #4 - Aug 15th, 2018 at 2:30pm
Print Post  
Thanks for the info I will look into it
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint