Learning C++ /CX with a console app

Most of the samples on MSDN and the project templates that ship with Visual Studio 2012 contain a lot of generated code and it is easy to get lost. If you want a simple project template that allows you to code “Hello World” style code samples and learn the language, then this project template is for you.

Please download it, install and use it. Feel free to share it with your colleagues, friends, co-workers etc and drop me a line via the comments box below this post on feedback, likes/dislikes etc.


Link to template on VS Gallery: http://visualstudiogallery.msdn.microsoft.com/8116acc4-747b-4330-bfd1-fce04d798f4a

5 thoughts on “Learning C++ /CX with a console app

  1. Carlo Pastorino

    Thank you very much! Do you have any link to any documentation on how you managed to create this template? Or can you highlight what are the main differences between a solution created using this template and a “standard” Win32 console application solution?
    I’m asking this because I tried several time starting from a Win32 console application and then I compared my solution with yours and I didn’t find anything different, or maybe I’m just blind! 😉
    Thank you!

    1. sridharpoduri Post author

      Hi Carlo,

      Glad you find the template useful. Unfortunately I do not have documentation with me. It is, however, easy to create your own.

      I started with a basic Win32 Console App and added new references to platform.winmd file. You can also do that via the Project->Properties->VC++ Directories and setting the “Library WinRT Directories” property.

      Hope this helps!

  2. Sai Jagannath

    Hi Sridhar,
    Looks the project settings you made are more than they meet the eye. Just modifying the VC++Directories and setting the “Library WinRT Directories” did not compile the code neither in VS2012 nor in VS2013 Preview.

    I downloaded the template for VS2012 and then copied the project file to the project I created for VS2013 and made few changes related to VS2013 and then was able to compile.


    1. sridharpoduri Post author

      Hi Jagannath,
      I am pretty sure it worked for me with VS2012. Did not check yet with VS2013. I will check and update the post. Thanks for reporting your observation.

  3. Pingback: Learning C++ /CX with a console app on Windows 8.1 | Sridhar Poduri's Blog on WinRT and C++ /CX

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.