Overview
Features
Download
Documentation
Community
Add-Ons & Services

Poco 1.4.1 build errors in x64 (both .cmd and .sln)

Please post support and help requests here.

Poco 1.4.1 build errors in x64 (both .cmd and .sln)

Postby SalvorHardin » 04 Mar 2011, 21:26

Building Poco 1.4.1 revision 1446 for x64 using Visual C++ 2008 SP1 Pro, generates "fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'".

Poco's bin64 directory remains empty after executing this .cmd file:
Code: Select all
@echo off
buildwin 90 build all both x64 samples


Partial build log of above cmd file (2nd run so it doesn't list every .cpp file being compiled)
Code: Select all
########################################################################
####
#### STARTING VISUAL STUDIO BUILD (vs90, x64)
####
########################################################################


The following configurations will be built:
debug_shared
release_shared
debug_static_mt
debug_static_md
release_static_mt
release_static_md

[...omitted due to forum post size restriction...]

Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>------ Build started: Project: uuidgen, Configuration: release_static_md x64 ------
2>------ Build started: Project: URI, Configuration: release_static_md x64 ------
2>Linking...
1>Linking...
2>.\obj64\release_static_md\URI.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
1>.\obj64\release_static_md\uuidgen.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
2>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\URI\obj64\release_static_md\BuildLog.htm"
2>URI - 1 error(s), 0 warning(s)
1>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\uuidgen\obj64\release_static_md\BuildLog.htm"
1>uuidgen - 1 error(s), 0 warning(s)
3>------ Build started: Project: Timer, Configuration: release_static_md x64 ------
3>Linking...
3>.\obj64\release_static_md\Timer.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
3>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\Timer\obj64\release_static_md\BuildLog.htm"
3>Timer - 1 error(s), 0 warning(s)
4>------ Build started: Project: StringTokenizer, Configuration: release_static_md x64 ------
4>Linking...
4>.\obj64\release_static_md\StringTokenizer.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
4>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\StringTokenizer\obj64\release_static_md\BuildLog.htm"
4>StringTokenizer - 1 error(s), 0 warning(s)
5>------ Build started: Project: NotificationQueue, Configuration: release_static_md x64 ------
5>Linking...
5>.\obj64\release_static_md\NotificationQueue.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
5>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\NotificationQueue\obj64\release_static_md\BuildLog.htm"
5>NotificationQueue - 1 error(s), 0 warning(s)
6>------ Build started: Project: md5, Configuration: release_static_md x64 ------
6>Linking...
6>.\obj64\release_static_md\md5.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
6>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\md5\obj64\release_static_md\BuildLog.htm"
6>md5 - 1 error(s), 0 warning(s)
7>------ Build started: Project: LogRotation, Configuration: release_static_md x64 ------
7>Linking...
7>.\obj64\release_static_md\LogRotation.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
7>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\LogRotation\obj64\release_static_md\BuildLog.htm"
7>LogRotation - 1 error(s), 0 warning(s)
8>------ Build started: Project: Logger, Configuration: release_static_md x64 ------
8>Linking...
8>.\obj64\release_static_md\Logger.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
8>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\Logger\obj64\release_static_md\BuildLog.htm"
8>Logger - 1 error(s), 0 warning(s)
9>------ Build started: Project: inflate, Configuration: release_static_md x64 ------
9>Linking...
9>.\obj64\release_static_md\inflate.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
9>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\inflate\obj64\release_static_md\BuildLog.htm"
9>inflate - 1 error(s), 0 warning(s)
10>------ Build started: Project: hmacmd5, Configuration: release_static_md x64 ------
10>Linking...
10>.\obj64\release_static_md\hmacmd5.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
10>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\hmacmd5\obj64\release_static_md\BuildLog.htm"
10>hmacmd5 - 1 error(s), 0 warning(s)
11>------ Build started: Project: grep, Configuration: release_static_md x64 ------
11>Linking...
12>------ Build started: Project: dir, Configuration: release_static_md x64 ------
11>.\obj64\release_static_md\grep.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
12>Linking...
11>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\grep\obj64\release_static_md\BuildLog.htm"
11>grep - 1 error(s), 0 warning(s)
12>.\obj64\release_static_md\dir.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
12>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\dir\obj64\release_static_md\BuildLog.htm"
12>dir - 1 error(s), 0 warning(s)
13>------ Build started: Project: deflate, Configuration: release_static_md x64 ------
13>Linking...
13>.\obj64\release_static_md\deflate.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
13>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\deflate\obj64\release_static_md\BuildLog.htm"
13>deflate - 1 error(s), 0 warning(s)
14>------ Build started: Project: DateTime, Configuration: release_static_md x64 ------
14>Linking...
14>.\obj64\release_static_md\DateTime.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
14>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\DateTime\obj64\release_static_md\BuildLog.htm"
14>DateTime - 1 error(s), 0 warning(s)
15>------ Build started: Project: BinaryReaderWriter, Configuration: release_static_md x64 ------
15>Linking...
15>.\obj64\release_static_md\BinaryReaderWriter.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
15>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\BinaryReaderWriter\obj64\release_static_md\BuildLog.htm"
15>BinaryReaderWriter - 1 error(s), 0 warning(s)
16>------ Build started: Project: base64encode, Configuration: release_static_md x64 ------
16>Linking...
16>.\obj64\release_static_md\base64encode.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
16>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\base64encode\obj64\release_static_md\BuildLog.htm"
16>base64encode - 1 error(s), 0 warning(s)
17>------ Build started: Project: base64decode, Configuration: release_static_md x64 ------
17>Linking...
17>.\obj64\release_static_md\base64decode.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
17>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\base64decode\obj64\release_static_md\BuildLog.htm"
17>base64decode - 1 error(s), 0 warning(s)
18>------ Build started: Project: Activity, Configuration: release_static_md x64 ------
18>Linking...
18>.\obj64\release_static_md\Activity.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
18>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\Activity\obj64\release_static_md\BuildLog.htm"
18>Activity - 1 error(s), 0 warning(s)
19>------ Build started: Project: ActiveMethod, Configuration: release_static_md x64 ------
19>Linking...
19>.\obj64\release_static_md\ActiveMethod.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
19>Build log was saved at "file://h:\lib\vc9\poco\Foundation\samples\ActiveMethod\obj64\release_static_md\BuildLog.htm"
19>ActiveMethod - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 19 failed, 0 up-to-date, 0 skipped ==========
[...omitted due to forum post size restriction...]


Building from Visual Studio 2008's IDE also produces an error. For example, building "pkill" sample project from IDE (Poco/Utils/samples_x64_vs90.sln) generates this log:
Code: Select all
1>------ Rebuild All started: Project: pkill, Configuration: release_static_md x64 ------
1>Deleting intermediate and output files for project 'pkill', configuration 'release_static_md|x64'
1>Compiling...
1>pkill.cpp
1>Linking...
1>PocoFoundationmd.lib(Process.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
1>Build log was saved at "file://h:\src\cpp\poco-1.4.1-svn\Util\samples\pkill\obj64\release_static_md\BuildLog.htm"
1>pkill - 1 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


In addition, I'm having problems linking my own x64 cmake-generated projects to Poco (via auto-linking in Poco/Foundation.h) -- Poco 32-bit works fantastic so my problems are limited to x64.
SalvorHardin
 
Posts: 29
Joined: 24 Aug 2010, 14:47

Re: Poco 1.4.1 build errors in x64 (both .cmd and .sln)

Postby budric » 17 Mar 2011, 23:08

I build POCO 64 bit manually in MSVC 2005. There's no 64 bit solution defined for MSVC2005 so the build scripts don't work. I open each 32 bit solution, use configuration manager to define 64 bit architecture and copy all properties from 32 bit configuration. The build works. Haven't encountered problems (well I have with Poco::Data but i don't think it's the 64 bit build), so you could give this method a try.
budric
 
Posts: 24
Joined: 13 May 2009, 17:14

Re: Poco 1.4.1 build errors in x64 (both .cmd and .sln)

Postby guenter » 22 Mar 2011, 19:00

When you build the 64-bit solutions from the command line, make sure you set the correct Visual Studio environment for 64-bit builds. From the Start menu, run Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 x64 Cross Tools Command Prompt. While building the x64 configs from a 32-bit environment seems to work initially, you'll get the linker errors shown above, and the code will actually still be 32-bit.
guenter
 
Posts: 1117
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Poco 1.4.1 build errors in x64 (both .cmd and .sln)

Postby Silverduck » 26 Apr 2011, 18:24

I have solved it with a little batch file which uses the cross compiler environment. For the different arguments to vcvarsall.bat, see http://msdn.microsoft.com/en-US/library/x4d2c09s.aspx.

Code: Select all
setlocal

set VSVARS_PATH=%1
set POCO_PLATFORM=%2
set VSPLATFORM=""

if "%POCO_PLATFORM%"=="x64" (set VSPLATFORM=x86_amd64)
if "%POCO_PLATFORM%"=="Win32" (set VSPLATFORM=x86)
echo "Platform: %VSPLATFORM%"

call %VSVARS_PATH%\vcvarsall.bat %VSPLATFORM%
cd poco-1.4.1p1-all
call buildwin 90 build all both %POCO_PLATFORM% nosamples devenv

endlocal
Silverduck
 
Posts: 2
Joined: 10 Mar 2011, 15:06


Return to Support

Who is online

Users browsing this forum: alex and 1 guest

cron