Visual C++

Visual Studio 2015 adds new capabilities that enable Visual C++ developers to build cross-platform mobile code that runs on Android, iOS, and Windows, all from a shared code base.

You can build apps and libraries for Android and iOS as well as Windows platforms when you install the Visual C++ Mobile Development optional components in Visual Studio 2015. Take existing C++ libraries and share the code across multiple platforms. Create C++ libraries that can be used by other project types such as Xamarin or Java Native Interface apps. You can even build complete Android Native Activity apps in Visual Studio by writing nothing but C++ code. All these scenarios take full advantage of the Visual Studio IDE, including IntelliSense, Debugging, Source Control Integration, and much more.

When you select the Visual C++ Android Development component, the Visual Studio 2015 setup includes all the dependencies you need for Android development in C++. Visual Studio installs the Android Native Development Kit, the Android SDK, Apache Ant, and the Java SE Development Kit, with support for Android API Levels 19 (KitKat) and 21 (Lollipop). If you have already installed these tools, you can easily configure Visual Studio to use them.

When you select the Visual C++ iOS Development component, Visual Studio installs a remote client that can interact with a Macintosh computer to build and test your C++ code in the iOS Simulator or on an iOS device attached to your Mac, and debug it in Visual Studio. Install iOS header files on your computer to take advantage of full IntelliSense in Visual Studio for your C++ code for iOS.

Visual Studio includes project templates that help you build working cross-platform code quickly, and the fast Microsoft Visual Studio Emulator for Android lets you test your app right on the desktop. With Visual Studio 2015 and Visual C++, you can do the following:

  • Create projects from templates for Android apps, Android Native Activity apps, or for static or dynamic Android code libraries that you can use in Android Java apps with JNI, Android Native Activity apps, and even in Xamarin native Android applications.
  • Create shared code library projects from templates that create both Android and iOS static libraries from a common set of C++ code. Easily extend your solutions to include Classic Windows library and Universal Windows library projects that share the same common code.
  • Use the cross-platform support for OpenGL ES to create virtually identical graphical apps on multiple platforms. The OpenGLES Application template makes it easy to share the common code for drawing with the app projects for each platform.
  • A template for Android allows using an external build system (including NDK-BUILD) based on makefile support. An empty project template for iOS lets you use Visual Studio with an existing Xcode project.
  • Write C++ code and take advantage of platform-specific IntelliSense to explore APIs and generate correct code for Android, iOS, or Windows targets. Use the advanced code authoring features built in to Visual Studio to refactor your code, view definitions or implementations inline, generate new shared code, and more.
  • Configure your build for x86 or ARM native platforms with a single drop-down menu. Use x86 configurations to target the Android and Windows device emulators or the iOS Simulator. Use ARM configurations to target ARM-based Windows, Android, and iOS mobile device hardware.
  • Deploy your code to attached Android devices or use Microsoft's performant Android emulator for testing. You can select the target emulator or device from a drop-down menu in Visual Studio.
  • Set breakpoints, watch variables, view the stack and step through code in the Visual Studio debugger. Visual Studio lets you debug your C++ code anywhere, even on connected Android devices or iOS devices connected to your Mac.
  • View the message log from an Android device by using the Visual Studio LogCat viewer. LogCat is an essential diagnostic tool for a good edit->build->debug experience on Android. Using the LogCat viewer, you can:
    • Search for specific log messages by using the search bar.
    • Use Toggle Autoscroll to view upcoming log messages easily, or to keep an interesting message on screen.
    • Clear previous log output messages.
    • Choose between various log source levels.
  • Use the popular Clang and GCC toolchains to build Android native binaries. Easily add new files to your projects. Use Visual Studio property pages to fine-tune compiler settings for building, debugging, and optimizing your cross-platform binary. You can also use advanced features like pre-compiled headers to speed up build times.

Cross-Platform Mobile Development with Visual C++ has never been easier. Use the Visual C++ Android and iOS Development components to extend the reach of your code and leverage your investment in fast, efficient, and portable C++ libraries.

Edit this page on GitHub