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 Compilation fails on one PC, works fine on another (Read 851 times)
DireSpume
Newbies
*
Offline


Posts: 2
Joined: Mar 4th, 2021
Compilation fails on one PC, works fine on another
Mar 8th, 2021 at 6:59pm
Print Post  
Hi,
I have a VisualMicro-related compilation error that I can't figure out.  I am using Visual Micro and Visual Studio on two different computers, and compiling the exact same code (for Arduino Due) with different results.  Compilation succeeds on my Home computer, but fails with a linker error on my Work computer.  I've attached the compilation log files for both computers.

The linker error is: HardwareSerial.h:26: undefined reference to vtable for HardwareSerial

What I've tried on my work computer so far:
- Compared every single Visual Micro setting and ensured they are the same on both computers.
- Clean, manually delete all intermediate files, including VM files.
- Delete all files that are not code, recreate solution.
- Uninstall/reinstall Arduino.
- Uninstall/reinstall board (Due).
- Uninstall/reinstall Visual Micro.
- Delete all temp files (in AppData/Local/Temp).

The project code is on a cloud drive that I am using on both PCs, so all files are identical.  Also, compilation is very slow on my work computer for some reason.

I appreciate any help!

  

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


Posts: 2145
Joined: Feb 13th, 2019
Re: Compilation fails on one PC, works fine on another
Reply #1 - Mar 8th, 2021 at 7:29pm
Print Post  
Thanks for the report.

On your work PC it seems the vMicro > Debugger > Compiler Optimization = No Optimization
On your home PC this is set to "Default Optimization" from the logs

Does this improve both the build speed and linker error on your work PC?
  
Back to top
 
IP Logged
 
DireSpume
Newbies
*
Offline


Posts: 2
Joined: Mar 4th, 2021
Re: Compilation fails on one PC, works fine on another
Reply #2 - Mar 9th, 2021 at 1:28am
Print Post  
Strange, on my work computer the option in the vMicro menu for Debugger > Compiler Optimization said Default Optimization.  So I changed it to No Optimization and then back to Default Optimization, and now it compiles okay.  I do remember changing that to No Optimization at some point (but I thought I had done so from Global Options, but then I couldn't find that option in there again).  But regardless, it appears that there was a disconnect between what was displayed in the menu and what option was being used for the compile.

As for the compile speed, it is still slow.  It takes several seconds just to do the deep search for libraries, and a total of 40 seconds to compile only 5 files (log attached).  My home computer does it in just a few seconds.  Not going to complain too much about that, but if you see anything easy to try, I'd be grateful for a faster compile.   

Thank you for the prompt help in finding that messed up Optimization option, glad to have my work computer working again!
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compilation fails on one PC, works fine on another
Reply #3 - Mar 12th, 2021 at 7:33pm
Print Post  
Great to hear it is working now.

The build speed it dependant on 1) virus checkers, 2) hard disk speed and 3) cpu speed.

tip

If you know what you are doing with libraries and all required libraries have an #include in the project_name.ino file and none of the libraries are conditonally included using an #if. Then you can switch off deep search. However don't be fooled by it in future when a library that is not #included in the .ino fails to be found, resulting in a build failure.

With deep search enabled you can review the verbose output to see all the libraries that have been used. For example:- 
Code
Select All
Using library NATE_Debug version 0.0.0 in folder 

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