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
Hot Topic (More than 8 Replies) Re: IntelliSense: identifier "xxx" is undefined and some other errors (Read 9063 times)
neonxc
Newbies
*
Offline


Posts: 9
Joined: Oct 20th, 2014
Re: IntelliSense: identifier "xxx" is undefined and some other errors
May 2nd, 2016 at 4:47pm
Print Post  
Hi,
at least one bug concerning Arduino Due is very clear. The intellisense doesn't "see" the definition of __cplusplus macro, which in my case results in no visibility of c++11 features in SAM libraries, although the sketch (project) compiles and works. Is there a possibility to look into it?

Best regards, tom Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #1 - May 2nd, 2016 at 9:20pm
Print Post  
Can you please provide an example of a c++11 feature you are expecting to see.

Also please confirm arduino ide version and visual micro version (from "tools>extensions and updates")

Did you try using the Gcc Android project or is this with std. Visual Micro project?

Thanks
  
Back to top
WWW  
IP Logged
 
neonxc
Newbies
*
Offline


Posts: 9
Joined: Oct 20th, 2014
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #2 - May 3rd, 2016 at 3:40pm
Print Post  
I'm using VS 2015 update 2, Arduino 1.6.8 and vMicro 1604.28.1. Arduino Due (programming port)

Try this one for example.

Code (C++)
Select All
#include <memory>

void setup()
{
  std::shared_ptr<int> r;
}

void loop()
{

} 



Or am I missing something? Thank you for your effort, micro is a superb tool anyway Smiley.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #3 - May 3rd, 2016 at 3:48pm
Print Post  
Thanks for the message and info. 

I will look into why the __cplusplus macro is not being seen. Visual Studio with Win32 c++ has been a problem for some Arduino syntax. 

However there is good news because Microsoft recently release a new Visual Studio c++ intellisense engine that understands the Gcc syntax that Arduino uses. It works really well! 

Hopefully during the next month or so we will release Visual Micro that uses the new system as an alternative with a simply click to change an existing project to new.

If in the future you have time spare and find the current system frustrating I can explain how to try it out.


« Last Edit: May 3rd, 2016 at 3:48pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
neonxc
Newbies
*
Offline


Posts: 9
Joined: Oct 20th, 2014
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #4 - May 3rd, 2016 at 3:53pm
Print Post  
I use this on daily basis today. It would be very kind from you to point me to the alternative Smiley.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #5 - May 3rd, 2016 at 3:57pm
Print Post  
One thing I forgot to mention with the current win32 c++ is that you can try your own intellisense defines without breaking the compiling. http://www.visualmicro.com/page/Extending-Visual-Studio-Intellisense.aspx

Below is a message copied from another forum thread. The basic principal is to install the Microsoft Android and CLang tools for Visual Studio. Create an empty Android CLang project and steal it and use it in place of the current .vcxproj in your sketch/project folder.


Microsoft released Clang compatibility in VS2015 Update 1

I tried using a new Visual Studio project type of Andoid/clang/gcc and the intellisense errors were almost none. 

During the next few weeks/month I will look into using the new VS clang without the Android stuff and instead of the standard Microsoft C++ project type we currently use.

You try it if you want. The android for visual studio system uses C++ projects so Visual Micro should work okay. 

The Android tools for VS are required (free) and can be installed via control panel>add or remove programs>visual studio>change.

Then you can use File>New>Project>Cross Platform>Static/Dynamic Library (Android) to create a project. You can remove any files that are automatically added to the new project. Then add a .ino of the same name and you have an Arduino project. 

In your version of Visual Micro you might need to restart the ide after adding the .ino to a project that was not previously an arduino project. (You don't need to do that in the next release)

You can copy and rename the .vcxproj if you want to use it in an existing standard visual micro project.

When moving files around remember these rules if you want visual micro to see a c++ project as an arduino project:-

  • A project (vcxproj) must be in a folder of the same name
  • The project must contain a .ino of the same name (in the same folder)

Notice that I have changed the "Platform Toolset" to GCC in the project properties

All other project properties can be ignored but you can alter most properties except for macros and include paths which Visual Micro maintains. 

After you have the correct .vcxproj type you should find gcc intellisense works much better.
« Last Edit: May 3rd, 2016 at 3:58pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #6 - May 3rd, 2016 at 3:59pm
Print Post  
Forgot the image showing the project type for the CLang/Android C++ project

Visual Micro just needs an empty .vcxproj in the correct format. Everything else works the same as normal.

« Last Edit: May 3rd, 2016 at 4:00pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
neonxc
Newbies
*
Offline


Posts: 9
Joined: Oct 20th, 2014
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #7 - May 3rd, 2016 at 8:42pm
Print Post  
I have just tried your variant and honestly have to say it's much worse this time Sad. The previous bugs stayed roughly the same and a lot of new appeared. Now I can't even use this one:
Code (C++)
Select All
using millis_t = decltype(millis());
 



Again, compilation without warnings..
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #8 - May 3rd, 2016 at 9:51pm
Print Post  
Hi,

Can you send a screen shot of the ide with your project open.

Other users are confiming it works so we just have some confusion.

You can see here a similar discussion and screen shots of how things should look :-

http://www.visualmicro.com/forums/YaBB.pl?num=1461504669/0#10
« Last Edit: May 3rd, 2016 at 9:52pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
neonxc
Newbies
*
Offline


Posts: 9
Joined: Oct 20th, 2014
Re: IntelliSense: identifier "xxx" is undefined and some other errors
Reply #9 - May 4th, 2016 at 6:06am
Print Post  
Here it is.

Sorry if I'm wrong, I tried to stick with your manual Smiley.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint