Yuri Astrakhan
Yuri Astrakhan

Reputation: 9965

Creating 64 bit CLR C++ projects in VS2008

I am creating a wrapper around a native lib, which comes in both 32 & 64 bit flavors. I have a fairly complex C++/CLR project that includes a number of header files from the native libs. I got it to work fine on x32, but now I'm not sure how to provide an alternative x64 build.

Can someone outline the steps to create such project?

Lastly - VS2008 has only Win32 platform listed, not Win64 (I do have x64 VS2008 component installed).

Thanks!

Upvotes: 2

Views: 2355

Answers (2)

3264
3264

Reputation: 371

Visual studio doesn't always install the 64 bit options.

It can be fixed by running the VS installer, choosing add/remove features, and checking the x64 feature.

Upvotes: 2

tyranid
tyranid

Reputation: 13318

Normally it is sufficient to select the drop down which says win32 (next to the Debug/Release one on the toolbar) and selected "Configuration Manager". Then open the "Active Solution Platform" drop down and select New. Choose x64 type (which if it doesn't exist then 64bit compilers are not installed) and copy solution from the orignal Win32 one. Now your project can be built selectively by changing the drop down on the toolbar.

Normally it works more or less as is but you might want to consider tweaking a few pre-processor defines if only for the intellisense.

As for libraries, for platform ones (supplied as part of VS/PSDK) then you dont need to change anything. For your libraries you are wrapping then change the Additional Library Directories in the project properties to point to the 64bit directory.

Upvotes: 6

Related Questions