Build a console program for AMD Athlon 64 bit

What complier and linker settings do I need?

I tried X64, but the linker choked on the first object I gave it. How do I tell the compiler what to do?

Thanks,

[169 byte] By [GerryRempel] at [2007-12-17]
# 1
Choked, how? I've no problems building for X64.
From what you have there you have at least VS 2005 Pro to be able to build for X64 but you would need to give the compiler output for it to be helpful.
crescens2k at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 2
The error is:

Error 1115 fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' c:\code\stuff\myfile.obj 1

What compiler settings do I need to change?

GerryRempel at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 3
Hmm, that looks like it is using the 32 bit compiler. Go to configuration manager and make sure that the project is x64 because even though you could have set the entire solution to x64, you may have left the individual project set to win32.

If not the other thing to check is what version of the compiler you got it using for x64. This is done through tools->options->projects and solutions->vc++ directories. If you choose x64 for the platform, under executibles it should be set to $(VCInstallDir)bin\x86_amd64 above $(VCInstallDir)bin otherwise it'll use the wrong compiler.

crescens2k at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 4
I'm checking my installation. I've install Visual Studio pro from my MSDN subscription disk, but I might not have gotten the 64 bit compiler. When I lock in my visual studio 8/VC/bin folder I don's see the x86_amd64 directory.
GerryRempel at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 5
I know what thats like, sometimes I forget to install something. But it should be under C++->x64 Compilers and Tools.
crescens2k at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 6
Also, make sure that the target machine field of the solution properties under configuration properties --> linker --> advanced is set to MachineX64 since it looks like the linker is passed the /machine:x64 option while it should be /machine:x64

Hope this helps!

Thanks,
Ayman Shoukry
VC++ Team

AymanShoukry at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 7
Now that I've installed the correct compiler it gets to link, but with lots of unresolved library externals.

Error 1118 error LNK2001: unresolved external symbol __imp_MultiByteToWideChar tickernet.obj

etc.

Any ideas?

GerryRempel at 2007-10-6 > top of Msdn Tech,Visual C++,Visual C++ Language...