MFC & ATL in Visual Studio Express 2008

I’ve learned this from the project Busmaster (http://www.etas.com/de/products/applications_open_source.php) , a hidden open source gem dealing with CAN communication. I originally just wanted to fix an internationalization issue (. / , as decimal sign – classic atof problem) , but I’ve learned so much from this project about CAN communication and using #include<vector>, and want to point this out for you.

They also have a really good documentation for their toolchain setup, and there’s something that both amazed and fascinated me: You can definitely use VS Express with ATL and MFC. You just need to figure out how.

(This is an extract / translation from the documents here: https://github.com/rbei-etas/busmaster/tree/master/Documents) – look for BUSMASTER OSS – Development Environment.doc

(As a clarification, I’m using the Professional Edition at work, which is far more sensible – I just need MFC/ATL to play).

I’m using VS2008. I dislike 2010, because it’s impossible to get global properties for libraries, paths,… I understand that decision, and it’s absolutely correct and okay, but personally, it’s annoying.
Okay for solutions with 3 projects, terrible for solutions with 30 projects.

You can’t directly download 2008 any more, but there are enough „deep“ links to get it. Just google, or try this one:
http://stackoverflow.com/questions/4482159/where-can-i-download-visual-studio-express-2008-not-2010

First, install Windows SDK. / Platform SDK. It won’t help, but you’ll need it to compile most things.

VS express doesn’t have ATL.
But
Windows Driver Development Kit has. http://www.microsoft.com/en-us/download/details.aspx?id=11800
Download, mount the ISO, install.
(Don’t do this for any public or commercial projects. Read the licences. It’s not allowed!)

This was never meant for you to develop directly with, so you need to patch those versions. For this, they are using git-diffs.
If you don’t have git:

Git for Windows : http://code.google.com/p/msysgit/downloads/list

Git Extensions http://code.google.com/p/gitextensions/

(If you are a Linux User, you probably won’t install Visual Studio. If you do, you don’t need this article.)

There are three files for patching this automatically: The git-patch, and two batch-scripts (for patching, and unpatching).

https://github.com/rbei-etas/busmaster/tree/master/Documents/1%20Development%20Environment/files

It assumes you’re using standard installation paths (ie C:WinDDK + C:Program Files Git).

You need to adapt them for example if you use Win 64 bit:

“C:Program Files (x86)Gitbinpatch” -p1 -d C:/ < WinDDK_7600.16385.1.diff

)

The patch has to run successfully, else your paths are wrong.

Now open VS and Tools → Options:

vs1 vs2

(These are the magical global settings not found in VS2010!)

There are limits:

* no Resource-Editing
* release-version (no debugging)

* it’s ATL from VS6.0 (don’t use too modern stuff)

Have fun!

Advertisements

2 comments

  1. FYI ATL in DDK 7600 is Version 7.1 that was supplied with Visual Studio 2003, not VS6.0. Happy coding!

  2. Nice article. Especially as it mentions our BUSMASTER project in a good way 🙂 Thanks, Tobias

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: