Visual Micro
>> >> Force build using C++ instead of C

Message started by lalaland on Jan 5th, 2018 at 11:41pm

Title: Force build using C++ instead of C
Post by lalaland on 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.

Title: Re: Force build using C++ instead of C
Post by Visual Micro on Jan 29th, 2018 at 12:14am

You have a few options


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


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 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.


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

Visual Micro » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2020. All Rights Reserved.