phofman / vs-plugin

Visual Studio Plugin for BlackBerry Native Development
13 stars 3 forks source link

C++11 Support #40

Closed phofman closed 9 years ago

phofman commented 9 years ago

Add support for C++11 features. The latest SDK 10.3.0.698 should already support it from the compiler point of view.

More details here.

rcmaniac25 commented 9 years ago

Do note that 10.3.1 removes GCC 4.8.2 and replaces it with GCC 4.8.3

phofman commented 9 years ago

True, thanks. I am experimenting with custom task that detects the latest version available vs enum/string project property, that will let override the default compiler.

phofman commented 9 years ago

OK. Basic support for compiler selection has been added on develop. Mostly all is tuned automatically, when g++ is activated. Only for VS2010 include paths should be corrected manually to compile without errors. Maybe this could be fixed in future releases.

Any help in testing the solution and comments about hard-to-use are welcome. For now - simply open project 'General' settings page and change the compiler override (Platform Compiler Version/Name). That should force usage of a different target compiler via qcc.

It could be seen in build logs as follows (for 4.8.2 and g++ for C++11):

1>  qcc -V4.8.2,gcc_ntoarmv7le_gpp -Wc,-std=c++11 -o main.o main.c -c -Wp,-MMD,main.d -Wp,-MT,main.o -lang-c++

Requirements: BB NDK 10.3 installed Supported project type: 'Regular' only (Cascades builds are not supported) Notes: lang-c++ is enforced for all source files by default

rcmaniac25 commented 9 years ago

Here's something that may simplify your life: If you specify GCC 4.8.3 in API 10.3.0, it will say something like "4.8.3 is not available, using 4.8.2".

But then again, it's another API specific check.

phofman commented 9 years ago

Thanks, this shouldn't affect the extension in its current state. Mentioned dynamic property in project settings looks into active NDK and suggests from compiler versions found directly there. It will nicely handle existing and future BB NDKs without any efforts. And if the qcc has a fallback mechanism, that's even better.