Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Force build using C++ instead of C (Read 926 times)
lalaland
Newbies
*
Offline



Posts: 1
Force build using C++ instead of C
Jan 5th, 2018 at 11:41pm
 
Is it possible to force build using the C++ options instead of C? My code seem to compile fine using the C++ compiler but not the C compiler.
Back to top
« Last Edit: Jan 5th, 2018 at 11:57pm by lalaland »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10463
United Kingdom
Re: Force build using C++ instead of C
Reply #1 - Jan 29th, 2018 at 12:14am
 
Hi,

You have a few options

1)

If you have a pro license you can add a board.txt to the project and override any of the arduino build properties. The c and cpp compiler defs are simple syntax like "key=def...."

Switch on "vmicro>compiler>show build properties" and look for the c and cpp ".pattern" keys then put a replacement in the board.txt

2)

If you don't have a pro license or want to make the change for all projects then use the build properties mentioned above to find the hardware source folder. In that folder you can edit a text file called platform.txt. platform.txt will contain a lot of what you see in the "show build properties" so should make sense.

Alternatively you can clone the platform.txt and call the clone platform.win.txt. Then make changes to the .win.txt version leaving the original.

If you change the arduiino core defs outside of visual micro while it is running, then click Re-scan on the visual micro explorer tool or restart the ide.

3)

If you only need to change a few switches you can add them to the "Extra c flags" in the "vMicro>Project Properties"

Back to top
« Last Edit: Jan 29th, 2018 at 12:14am by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print