Visual Studio 2012 Express – Metro Only?

This post’s title says it all. I’ve just installed the Windows 8 Release Preview with Visual Studio 2012 RC. Just like in the previous release, Visual Studio 11 Beta, the Express edition does not contain any plain Win32 project templates, only ones for Microsoft’s new Metro UI.

This is a pretty scary situation for me: recently, the C++11 Standard was completed which finally makes threading in C++ bearable (when writing libraries, you no longer have to force a decision between Boost, TBB or POCO on your users). But C++11 threading was only added to Microsoft’s C++ compiler & standard library in Visual Studio 2012.

So unless Microsoft reverts the decision to no longer offer a free C++ compiler for Windows desktop applications, these are my options:

  • Buy Visual Studio 2012 Professional and exclude anybody out there who doesn’t want to shell out $500 from using my libraries. Make it harder to build any kind of team because there’s now a significant hurdle to entry. Probably be forced to modify 3rd party libraries in the future because Open Source projects will no longer test compilation of their code with Visual Studio.
  • Keep Visual C++ 2010 Express and either write my own threading wrapper (increasing dependencies of my libraries from 0 to 1) or just go with Boost and forget the rest.
  • Switch to Eclipse CDT + MingW and build my Windows desktop applications this way. That would give me C++11 threading (at least I suppose so – I couldn’t get it to work, see screenshot) but I’d have to always port anything I write to GCC (of which MingW is a port). Could be a good thing, since it lowers the barrier to port my stuff to Linux and Android.

Update: if you want to weigh in, I’ve been so bold and filed a bug report on Microsoft Connect: Support C++ Desktop Applications in Visual Studio 2012 Express.

Update2: the disaster is averted! Today, the Visual Studio blog announced that Microsoft has given in and will be offering two Express editions: The already known Visual Studio 2012 Express and, Visual Studio 2012 Express for Windows Desktop. That means it’s safe to use C++11 across the board now. GCC 4.6 has it, the modded Android NDK has it, and Visual C++ 2012 has it!

Read More

Ogre 1.8.0 RC1 for WinRT/Metro

Ogre 3D Logo

Here’s an interesting hypothesis: when Apple started its App Store, it was the El Dorado of software developers. Now Microsoft is adding an App Store to Windows 8. The Windows user base is huge, much larger than even the number of people running around with iPhones in their pockets (some estimates I came across average to around 75 million iPhone users [1] [2] versus around 600 million Windows users [3] [4]). Even if Windows 8 adoption rates are as bad as Vista’s you could turn a mighty profit!

What better way could there be to achieve that than to publish a 3D game on the Windows App Store when most of the world’s developers are still trying to get a grasp of WinRT? :)

Of course I wanted to use an existing 3D engine, so I reviewed my options:

Ogre 3D A user named Eugene on the Ogre forums already did all the work required fixing invalid API calls so Ogre compiles and validates on WinRT. This is what this post is about!
C4 Engine No word on WinRT/Metro support. C4 is based on OpenGL, but Windows App Store only allows Direct3D 11 to be used. I’ve seen someone on C4’s forums working on a Direct3D 11 renderer, so if its source is released, C4 users might get lucky.
Unity I believe Unity is well positioned for Metro support (they have an experimental Direct3D 11 renderer, I wouldn’t rule out porting Mono to WinRT either). No official statement yet and I’ll not risk betting on some kind of surprise. You can vote for Unity WinRT/Metro support here.
Axiom 3D Axiom 3D is a .NET rewrite of Ogre. Work on a SharpDX renderer is on its way, and SharpDX will support WinRT/Metro. Sadly, Axiom 3D is severely understaffed, thus, despite fantastic people like Borrillis, the massive size of the code base means it’s moving slowly.

Read More

How to Consume DLLs in a WinRT/Metro Project

Yesterday, I published a small guide on how to consume DLLs in Visual C++ that explained how to best integrate a third-party library into a Visual C++ project. This is a follow-up article for Visual Studio 11 Beta users that contains the additional steps required to consume a normal (non WinRT Component) DLL in a WinRT/Metro project.

Assuming you have the DLL integrated into a WinRT application project as explained in my previous blog post, you will notice that when you try to run the application, there will be an error message stating that the Windows Metro style application could not be activated and the output window will report a missing dependency:

Screenshot of Visual Studio 11 reporting an activation error on a WinRT/Metro application

Read More

How to Consume DLLs in Visual C++

For the C++ game programmer, there’s a huge collection of Open Source and commercial libraries available doing all kinds of things from simulating physics, reading common image formats or storing your data to rendering cutting-edge 3D graphics. But consuming those libraries in you own applications is often accompanied with a bit of hazzle since you need to point your linker to the right import libraries, copy the right DLLs into your project’s output directory and add the directory containing the matching headers to your compiler’s "include" directories.

It will get a little harder even when you target the Windows 8 App Store, where you need to provide binaries compiled for 3 platforms: x86, x64 and arm. I’ve been using C++ for over 10 years now and over time, I have come up with a method for organizing and consuming libraries that has served me very well.

Read More
The logo used by Microsoft for .NET 4.0, a wavy letter N accompanied by the text "Microsoft .NET"

Visual Studio 2010

Two weeks ago, Microsoft released Visual Studio 2010 and with it, .NET 4.0.

I’m very excited about .NET 4.0 because this is the first standalone release of .NET since 2.0 came out, meaning that it doesn’t bundle any of the older runtimes. As you may know, .NET 3.5 is actually just .NET 2.0 with some more assemblies – all the magic required for LINQ, extension methods and lambda expressions happens in the compiler.

The letter N constructed from overlapping blue wave functions

The new Visual Studio UI also looks very nice and the darker background puts the actual work (the code) into focus. But there have been some changes like the apparent removal of the Debug/Release combo in the toolbar and the ability to add your own External Tools to the Tools menu in the Express Editions (don’t worry, both are still there, I explain how to enable them a bit down in this article).

So I decided to write a small heads-up on why I think Visual Studio 2010 and .NET 4.0 are cool and how to get back your favorite options if you’re already used to the Visual Studio 2008 Express Editions.

Read More