views:

107

answers:

1

I have a VS 2008 C++ project, with one very small and simple code file. I need to write an app to generate this file and build the project into a Win32 DLL. I will need to deliver a free compiler etc. with the app to my client, so I can't automate VS to do this.

How would I best go about this?

A: 

VS 2008 Express installs the command line compiler (in fact the installer has an option so you only get the command line stuff). So getting a free compiler is no problem.

If you really only need to build a single file into a DLL, a cl command using the '/LD' option should be enough to do the trick (though you'll likely need at least a couple other options).

If you want to get fancy, I'm not sure if The Express SKU includes nmake.exe (but I imagine it does).

Michael Burr
I'll also need to link, and I no nothing about that either.
ProfK
cl.exe will take care of linking, too. You'll need to read the docs on cl.exe to determine which options you need. If you have a working VS project, the project's properties dialog has panels that will show you the options it's using to build the project.
Michael Burr