Community
cancel
Showing results for 
Search instead for 
Did you mean: 
servil
Beginner
63 Views

Problem: making x64 static library

Hello all.

Just starting with 64bit coding. Tools used: Intel C++ 11.1 EM64T, Visual C++ Express 9.0

Created dummy.cpp file

Now run

D:\\develop\\Intel\\CPP\\bin\\Intel64\\icl /nologo /GF /MD /Gd /Gy /Zl /Qoption,c,--arg_dep_lookup /Qwd69 /Qvc9 /Ox /GX /GR /Qoption,cpp,--arg_dep_lookup /DNDEBUG=1 /D_WIN32_IE=0x0900 /D_WIN32=1 /DWIN32=1 /DWINVER=0x0601 /D_WIN32_WINDOWS=0x0601 /D_WIN64=1 /DWIN64=1 /D_WIN32_WINNT=0x0601 /D__NT__=0x0601 /D_LIB=1 /D_USRLIB=1 /D_AFXDLL=1 /D_ATL_DLL=1 /ID:\\develop\\Intel\\CPP\\include\\intel64 /ID:\\develop\\Intel\\CPP\\include /I"D:\\Microsoft\\Visual Studio 9\\VC\\\\include" /ID:\\Microsoft\\SDKs\\Windows\\v7.0A\\include /c /Fo./ ./dummy.cpp

Passed. Now dummy.obj is available. Making the library:

D:\\develop\\Intel\\CPP\\bin\\Intel64\\xilib /nologo /machine:x64 /out:./dummy.lib ./dummy.obj /libpath:D:\\develop\\Intel\\CPP\\lib\\Intel64 /libpath:"D:\\Microsoft\\Visual Studio 9\\VC\\\\lib\\amd64" /libpath:"D:\\Microsoft\\Visual Studio 9\\VC\\\\lib" /libpath:D:\\Microsoft\\SDKs\\Windows\\v7.0A\\lib\\x64 /libpath:D:\\Microsoft\\SDKs\\Windows\\v7.0A\\lib

Getting this error:

./dummy.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
FATAL: target was not made (./dummy.lib) : see above

I don't understand, stated x64 as target machine, though xilib complains about X86 :???:
Pls for resolution.
0 Kudos
2 Replies
Mark_S_Intel1
Employee
63 Views

The Intel xilib program calls the Microsoft linker. It could be that xilib finds the 32-bit Microsoft linker in the path rather than the 64-bit Microsoft linker off of the Windows SDK (e.g. C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64 ). To ensure proper path, please set PATH for lib, and incldue to point to the 64-bit Microsoft tools before you run icl and xilink.

--mark
ILevi1
Valued Contributor I
63 Views

You should not define both /D_WIN32=1 /DWIN32=1 and /D_WIN64=1 /DWIN64=1 when compiling.

The link error you are getting basically says that the object file produced by the compiler has been generated for X86 instead for X64, and as such cannot be placed into 64-bit static library.

Reply