build 64bit using VC++ 2005 Express

Started by
5 comments, last by McZ 18 years, 4 months ago
if I don't remember wrong the VC++ 2005 Express edition doesn't support building for 64bit cpus, but it didn't support building Win32 without the PSDK either so is there some way to use the compiler from the PSDK to build 64bit? where can I change that?
Advertisement
Probably not. Surely the Platform SDK doesn't include any compiler tools?

If Microsoft provided a free set of 64bit compiler tools, there's no reason this wouldn't already be part of the Express editions of Visual Studio.
64 bit compiling is disabled in VC++ 2005 Express as far as I know.
Well.. I can choose 'Start -> All programs -> Microsoft Platform SDK for Windows Server 2003 SP1 -> Open Build Enviroment Window -> Windows XP 64-Bit Build Enviroment -> Set Windows XP x64 Build Environment (Debug)'

it says like this when downloading.
Quote:
The applications you develop with this edition of the SDK can run on the x86, x64 and Itanium-based versions of Windows Server 2003 SP1, Windows XP SP2, Windows XP x64 Pro Edition, and Windows 2000. A new custom install allows you to select components you wish to install on a more granular level.


http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en

Maybe the compiler is 64-bit and the output is only 32-bit.

but then there is a document in a sub-dir of the PSDK install dir that says like this in the heading 'Microsoft® C/C++ Compiler (Targeting the AMD64 and x64 Architectures)'

I can't see why it wouldn't compile for 64-bit? or have I missed something
Quote:Original post by Fixxer
64 bit compiling is disabled in VC++ 2005 Express as far as I know.


yes, I know... but as I wrote in the first post building Win32 applications is disabled in VC++ 2005 Express too but still it is posible by using the PSDK.
the x64 cross compiiler is only available with VS2005 pro or better.
cross compiler? isn't that only if I'm working on 32bit winxp and compiling for 64bit?

Altough I have solved my problem now, and have successfully compiled the Window application that you get when you create a new windows application running in 64 bit at least according to the Taskmanager in win xp 64 becouse ther is no *32 after the process.

so if my test application above is really running in 64-bit then there IS a compiler for 64-bit included with the PSDK (I have the latest version) and it works in VC++ 2005 Express edition with some modification.

if anyone is interested I did like this:
1) Start -> All Programs -> Microsoft Platform SDK for Windows Server 2003 SP1 -> Windows XP 64-bit Build Environment -> Set Windows XP x64 Build Environment (Debug/Retail) <- doesn't mather which one at this moment

2) start the VC++ 2005 Express IDE run the VCExpress.exe file with the /USEENV swich: [your install dir of VC++ 2005 Express]\Common7\IDE\VCExpress.exe /USEENV This will clear out all default bin/lib/include path and add only those that the 'Set Windows XP x64 Build Environment (Debug/Retail)' batch file sets for you.

3) Open your application or create a new one.

4) Edit the properties for the application ( Project -> Properties ) and change this settings to this values.

C/C++ -> General -> Debug Information Format : Program Database (/Zi)
C/C++ -> Code Generation -> Basic Runtime Checks : Default
Linker -> Advanced -> Target Machine : not set
Linker -> Command Line -> Additional Options : /MACHINE:AMD64

now it should be able to compile for 64bit (I think I havn't forgotten anything)

altough I got this error:
error PRJ0002 : Error result 128 returned from 'C:\Program Files\Microsoft Platform SDK\Bin\mt.exe'.

but solved it by copy the mt.exe that comes with the VC++ 2005 Express install to the PSDK/Bin dir, thus overwriting the PSDK/bin/mt.exe.

EDIT: I havn't tested it anything yet just compiled a simple windows app and a console app and the TaskManager doesn't say *32 after the process as it would do if it was 32-bit. I don't know if it works with larger projects or anything because I got it working for like 10 minutes ago :)

EDIT 2: Another thing I almost forgot. you maybe get this error described here: http://support.microsoft.com/?id=894573 adding bufferoverflowU.lib to the project will solve that.

This topic is closed to new replies.

Advertisement