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 Force build using C++ instead of C (Read 2181 times)
lalaland
Newbies
*
Offline


Posts: 1
Joined: Jan 5th, 2018
Force build using C++ instead of C
Jan 5th, 2018 at 11:41pm
Print Post  
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.
« Last Edit: Jan 5th, 2018 at 11:57pm by lalaland »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Force build using C++ instead of C
Reply #1 - Jan 29th, 2018 at 12:14am
Print Post  
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"

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