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 C++11 compiler? (Read 7067 times)
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
C++11 compiler?
Sep 29th, 2014 at 6:41am
Print Post  
Aduino is breaking my C++11 code.
Is there a way to upgrade Visual Micro to a C++11 compiler?

Thank you.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C++11 compiler?
Reply #1 - Sep 29th, 2014 at 11:06am
Print Post  
Hi,

Are you having Arduino compile or intellisense issues?

Thanks
  
Back to top
IP Logged
 
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Re: C++11 compiler?
Reply #2 - Sep 29th, 2014 at 2:43pm
Print Post  
Arduino and Visual Micro are getting the same errors e.g.
Code (C++)
Select All
void setup()
{
	int* x = NULL;		//this line compiles fine
	int* y = nullptr;	//error: 'nullptr' was not declared in this scope
				//nullptr (since C++11) http://en.cppreference.com/w/cpp/language/nullptr
}

void loop()
{
} 


OutPut:
Quote:
Compiling 'null' for 'Arduino Uno'
null.ino:In function 'void setup()'
null.ino:11: error: 'nullptr' was not declared in this scope
Error compiling
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C++11 compiler?
Reply #3 - Sep 29th, 2014 at 2:52pm
Print Post  
Thanks for the info.

As you can see Visual Micro provides an Arduino compatible compilation in alternative development tools that provide more features than the Arduino IDE/text editor. The Arduino world uses gcc and does not use Microsoft syntax.

You can find high level examples of supported syntax here http://arduino.cc/en/Reference/HomePage.

You can also drill down into the core for your selected Arduino hardware (which will either be avr 8bit or sam 32 bit). Doing so will give you additional capabilities but will not give you a Microsoft compiler.

You will find that Atmel Studio (VS 2010) understands the Arduino code better than Visual Studio but that Visual Studio can be nicer to use. Both IDE's are supported by Visual Micro.

Visual Micro uses the compiler and upload tools that are installed when you installed your Arduino IDE.

I suggest you use the Arduino IDE for a few weeks so you an see what is supported by Arduino and after that use Visual Studio. You do have to work within the Arduino rules, there is a lot involved in creating and uploading these programs in the correct structure and does not allow for custom compilers. Sorry

Thanks
« Last Edit: Sep 29th, 2014 at 3:02pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: C++11 compiler?
Reply #4 - Sep 29th, 2014 at 3:34pm
Print Post  
ps:

Before you ask why this is not in the documentation I quote from the lead text of the visualmicro.com home page

Quote:
Visual Micro is a free Arduino programming plugin that makes Microsoft Visual Studio 2008-2013 and Atmel Studio 6.1-6.2 into full Arduino programming environment.

Visual Micro ensures that your sketch code remains fully compatible with the Arduino Ide and is the only Ide to support all Arduino versions in a single Ide.

Visual Micro shares the same configuration as the Arduino Ide so the arduino.cc wiki applies fully when using Visual Micro.


Hopefully you can see it is clear that that Arduino and Visual Micro do not support the Microsoft compiler from VS 2012/2013.

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