views:

917

answers:

1

Hi,

I am using VS 2003 .Net on 32 bit XP OS. I have also installed "Microsoft Platform SDK" on my machine. Can I build vc++ application (binaries) targeted for 64 bit OS?

I am using following project options :

    Name="VCLinkerTool"
    AdditionalOptions="/machine:AMD64 bufferoverflowU.lib"
    OutputFile="\bin\Release\MM64.dll"
    LinkIncremental="1"
    SuppressStartupBanner="TRUE"
    AdditionalLibraryDirectories=""C:\Program Files\Microsoft Platform SDK\Lib\AMD64""
    GenerateDebugInformation="TRUE"
    ProgramDatabaseFile="\bin\Release\MM64.pdb"
    GenerateMapFile="TRUE"
    MapFileName="\bin\Release\MM64.map"
    MapExports="TRUE"
    MapLines="TRUE"
    OptimizeReferences="2"
    EnableCOMDATFolding="2"
    ImportLibrary=".\Release/MM64.lib"
    TargetMachine="0"/>

I am getting following error:

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'AMD64'

Do I need to build project on 64 bit OS or I need to change project settings to resolve this error. Please help me to resolve this issue.

A: 

I had the same problem today, here's how I solved it (in Visual Studio 2008): Went to Project Properties -> Linker -> Command Line -> Additional Options and removed the /MACHINE:I386 from the linker additional options.

Hope it helps

Fabio de Miranda