Skip to content

building 1.5.1 on Windows for x64 #224

@aleks-f

Description

@aleks-f

From http://pocoproject.org/forum/viewtopic.php?f=12&t=5918

building 1.5.1 on Windows for x64
by muellerto » Mon Jun 17, 2013 5:55 am

I get a lot of problems running a build on Windows (MSVC) for x64. (Win32 runs fine.)

The major issue is that 32bit code seems to be produced while we are compiling for 64bit. > Look at this:

Build started 17.06.2013 12:10:17.
     1>Project "E:\dev\pdrx\3rdParty\poco-1.5.1-all\CppUnit\CppUnit_x64_vs100.vcxproj" on node 1 (build target(s)).
     1>PrepareForBuild:
         Creating directory "..\bin64\".
       InitializeBuildStatus:
         Touching "obj64\release_shared\CppUnit.unsuccessfulbuild".
       ClCompile:
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\CL.exe /c /Iinclude /Zi /nologo /W3 /WX- /Od /Ob1 /Oi /Ot /Oy /D WIN32 /D NDEBUG /D _WINDOWS /
         D _AFXDLL /D POCO_DLL /D CppUnit_EXPORTS /D _CRT_SECURE_NO_DEPRECATE /D _WINDLL /D _MBCS /GF /Gm- /EHsc /MD /GS- /fp:precise /Zc:wchar_t /Zc:forScope /GR
          /Fo"obj64\release_shared\\" /Fd"obj64\release_shared\vc70.pdb" /Gd /TP /errorReport:queue src\CppUnitException.cpp src\TestCase.cpp src\TestDecorator.cp
         p src\TestFailure.cpp src\TestResult.cpp src\TestRunner.cpp src\TestSuite.cpp src\TextTestResult.cpp
         CppUnitException.cpp
         TestCase.cpp
         TestDecorator.cpp
         TestFailure.cpp
         TestResult.cpp
         TestRunner.cpp
         TestSuite.cpp
         TextTestResult.cpp
         Generating Code...
       MakeDirsForLink:
         Creating directory "E:\dev\pdrx\3rdParty\poco-1.5.1-all\lib64\".
       Link:
         C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.exe /ERRORREPORT:QUEUE /OUT:"..\bin64\CppUnit64.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib
          user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:
         "obj64\release_shared\CppUnit64.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"..\
         lib64\CppUnit.lib" /MACHINE:X64 /DLL obj64\release_shared\CppUnitException.obj
         obj64\release_shared\TestCase.obj
         obj64\release_shared\TestDecorator.obj
         obj64\release_shared\TestFailure.obj
         obj64\release_shared\TestResult.obj
         obj64\release_shared\TestRunner.obj
         obj64\release_shared\TestSuite.obj
         obj64\release_shared\TextTestResult.obj
     1>obj64\release_shared\CppUnitException.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' [E:\dev\pdrx\3rdParty\p
       oco-1.5.1-all\CppUnit\CppUnit_x64_vs100.vcxproj]
     1>Done Building Project "E:\dev\pdrx\3rdParty\poco-1.5.1-all\CppUnit\CppUnit_x64_vs100.vcxproj" (build target(s)) -- FAILED.

Build FAILED.

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'   - this happens in many modules, again and again, regardless of I compile a DLL or a LIB, release or debug. The only thing I did was to change "Win32" to "x64" in the build_vs100.cmd file. What's the reason for this?
muellerto

Re: building 1.5.1 on Windows for x64
by guenter » Mon Jun 17, 2013 6:11 am

You're building from a 32-bit toolchain environment. To build for 64-bit, you'll need to
launch the x64 cross tools command prompt.
guenter

Re: building 1.5.1 on Windows for x64
by alex » Mon Jun 17, 2013 7:10 am

The problem is that buildwin.cmd has 32-bit environment hard-coded, vsvars32.bat should > be changed to vcvarsall.bat with proper argument (x86 or amd64).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions