Feb 8, 2012 at 7:53am Feb 8, 2012 at 7:53am UTC
Hello,
im geeting the next error:
LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
Im working on 64bit machine (VS2008) and i have the x64 compiler.
I checked that the build is on x64.
Can anyone please advise?
Thanks!!!
Feb 8, 2012 at 10:30am Feb 8, 2012 at 10:30am UTC
On the assumption you're using Visual Studio on some kind of Windows machine, something like;
Project Properties -> Linker -> Command Line -> Additional Options
Remove the /MACHINE:I386 from the linker additional options.
Feb 8, 2012 at 11:34am Feb 8, 2012 at 11:34am UTC
YOu most likely are trying to use a X86 library in your project.
Feb 8, 2012 at 1:32pm Feb 8, 2012 at 1:32pm UTC
Thanks Moschops,but there is no /MACHINE:I386 there:
/OUT:"../../bin/win64/Release/cppIntegration.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.1\/lib/x64" /LIBPATH:"../../common/lib/x64" /MANIFEST /MANIFESTFILE:"x64\Release\cppIntegration.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /OPT:REF /OPT:NOICF /DYNAMICBASE:NO /MACHINE:X64 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
Feb 8, 2012 at 1:33pm Feb 8, 2012 at 1:33pm UTC
Thanks modoran but i there are no additinal depandencies in my project.
Feb 8, 2012 at 2:21pm Feb 8, 2012 at 2:21pm UTC
Your build configuration is conflicting with your target machine type. Changing the machine type in the linker options isn't enough.
You need to add a new configuration via the configuration manager - Should be in the drop down menu where it says "Win32". In the configuration manager, change the platform to x64. Then select your new configuration and rebuild.
Feb 8, 2012 at 2:37pm Feb 8, 2012 at 2:37pm UTC
thanks lodger but its allready set to x64
Feb 8, 2012 at 3:18pm Feb 8, 2012 at 3:18pm UTC
You'd probably get better luck in a Visual Studio forum, rather than a C++ forum.