You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by sh...@e-z.net on 2011/11/22 19:31:42 UTC

XERCES-C unable to build X64 DLLs using MS VC8, VC9, VC10

XERCES-C Building X64 Sources ON MS (VC8, VC9, VC10)

I am trying to create an integrated software release.  Platform Win32
works OK, but the X64 platform fails with a LNK1112 error.

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

reference module -> File: Base64.obj

--- The following describes my build environment invoking Microsoft VS
.NET ---

The xerces-c source distributions are copied respectively to the following
folders.

  Version 2.7.0  ->  C:\Apache\xerces-src-27

  Version 2.8.0  ->  C:\Apache\xerces-src-28

  Version 3.1.1  ->  C:\Apache\xerces-src-31

--- Here is a batch file to launch Microsoft VS .NET ---

:: Choose the Xerces Source Release

:: SET SRCDIR=xerces-src-28
:: SET SRCDIR=xerces-src-27
SET SRCDIR=xerces-src-31

:: Choose the MS VS .NET VC++ Version

:: SET VCVER=VC7.1
:: SET VCVER=VC8
:: SET VCVER=VC9
SET VCVER=VC10

set XSOLUTIONFILE=%SRCDIR%\Projects\Win32\%VCVER%\xerces-all\xerces-all.sln

:: Setup Working Environment

SET PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\wbem
SET INCLUDE=
SET LIB=
SET SOURCE=

if "%VCVER%" == "VC7.1" call "%VS71COMNTOOLS%\vsvars32.bat"
if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\vsvars32.bat"
if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\vsvars32.bat"
if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\vsvars32.bat"

:: Enter the development environment

devenv %XSOLUTIONFILE% /useenv

-----------------

Within visual studio .net

Select the (X64) platform

Select configuration (Release) or (Debug)

Select the project (XercesLib)

and then (Build) or (Rebuild)

-----------------

The LNK1112 error above is issued.

When using the (Win32) platform, all goes well.

I can use some guidance on how to build the X64 library.

Sincerely,
Steven J. Hathaway




---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: XERCES-C unable to build X64 DLLs using MS VC8, VC9, VC10

Posted by Steve Hathaway <sh...@e-z.net>.
Correction:

if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\..\..\VC\vcvarsall.bat"
x86_amd64
  if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat"
x86_amd64
  if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat"
x86_amd64


On 11/30/2011 10:24 AM, shathawa@e-z.net wrote:
> RESOLVED by setting the environment using vcvarsall.bat
> by replacing the environment setup with the appropriate
> cross-compiler environment option.
>
>   if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\..\..\VC\vsvars32.bat"
> x86_amd64
>   if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\..\..\VC\vsvars32.bat"
> x86_amd64
>   if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\..\..\VC\vsvars32.bat"
> x86_amd64
>
> This resolves the LNK1112 error when linking x64 microsoft builds
> initiated by the command-line Visual Studio interface.
>
> Steven J. Hathaway
>


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Re: XERCES-C unable to build X64 DLLs using MS VC8, VC9, VC10

Posted by sh...@e-z.net.
RESOLVED by setting the environment using vcvarsall.bat
by replacing the environment setup with the appropriate
cross-compiler environment option.

 if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\..\..\VC\vsvars32.bat"
x86_amd64
 if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\..\..\VC\vsvars32.bat"
x86_amd64
 if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\..\..\VC\vsvars32.bat"
x86_amd64

This resolves the LNK1112 error when linking x64 microsoft builds
initiated by the command-line Visual Studio interface.

Steven J. Hathaway

> Interactive startup of MS Visual Studio Works OK.
> But I need to do builds from command line, batch jobs.
>
> If I first enter the MS Visual Studio and then interactively
> select the solution file for xerces-c, then the building for
> X64 platforms for configurations (Release) and (Debug) works OK.
>
> Sincerely,
> Steven J. Hathaway
>
>> XERCES-C Building X64 Sources ON MS (VC8, VC9, VC10)
>>
>> I am trying to create an integrated software release.  Platform Win32
>> works OK, but the X64 platform fails with a LNK1112 error.
>>
>> fatal error LNK1112:module machine type 'X86' conflicts with target
>> machine type 'x64'
>>
>> reference module -> File: Base64.obj
>>
>> --- The following describes my build environment invoking Microsoft VS
>> .NET ---
>>
>> The xerces-c source distributions are copied respectively to the
>> following
>> folders.
>>
>>   Version 2.7.0  ->  C:\Apache\xerces-src-27
>>
>>   Version 2.8.0  ->  C:\Apache\xerces-src-28
>>
>>   Version 3.1.1  ->  C:\Apache\xerces-src-31
>>
>> --- Here is a batch file to launch Microsoft VS .NET ---
>>
>> :: Choose the Xerces Source Release
>>
>> :: SET SRCDIR=xerces-src-28
>> :: SET SRCDIR=xerces-src-27
>> SET SRCDIR=xerces-src-31
>>
>> :: Choose the MS VS .NET VC++ Version
>>
>> :: SET VCVER=VC7.1
>> :: SET VCVER=VC8
>> :: SET VCVER=VC9
>> SET VCVER=VC10
>>
>> set
>> XSOLUTIONFILE=%SRCDIR%\Projects\Win32\%VCVER%\xerces-all\xerces-all.sln
>>
>> :: Setup Working Environment
>>
>> SET PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\wbem
>> SET INCLUDE=
>> SET LIB=
>> SET SOURCE=
>>
>> if "%VCVER%" == "VC7.1" call "%VS71COMNTOOLS%\vsvars32.bat"
>> if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\vsvars32.bat"
>> if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\vsvars32.bat"
>> if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\vsvars32.bat"
>>
>> :: Enter the development environment
>>
>> devenv %XSOLUTIONFILE% /useenv
>>
>> -----------------
>>
>> Within visual studio .net
>>
>> Select the (X64) platform
>>
>> Select configuration (Release) or (Debug)
>>
>> Select the project (XercesLib)
>>
>> and then (Build) or (Rebuild)
>>
>> -----------------
>>
>> The LNK1112 error above is issued.
>>
>> When using the (Win32) platform, all goes well.
>>
>> I can use some guidance on how to build the X64 library.
>>
>> Sincerely,
>> Steven J. Hathaway
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: c-dev-help@xerces.apache.org
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


Re: XERCES-C unable to build X64 DLLs using MS VC8, VC9, VC10

Posted by sh...@e-z.net.
Interactive startup of MS Visual Studio Works OK.
But I need to do builds from command line, batch jobs.

If I first enter the MS Visual Studio and then interactively
select the solution file for xerces-c, then the building for
X64 platforms for configurations (Release) and (Debug) works OK.

Sincerely,
Steven J. Hathaway

> XERCES-C Building X64 Sources ON MS (VC8, VC9, VC10)
>
> I am trying to create an integrated software release.  Platform Win32
> works OK, but the X64 platform fails with a LNK1112 error.
>
> fatal error LNK1112:module machine type 'X86' conflicts with target
> machine type 'x64'
>
> reference module -> File: Base64.obj
>
> --- The following describes my build environment invoking Microsoft VS
> .NET ---
>
> The xerces-c source distributions are copied respectively to the following
> folders.
>
>   Version 2.7.0  ->  C:\Apache\xerces-src-27
>
>   Version 2.8.0  ->  C:\Apache\xerces-src-28
>
>   Version 3.1.1  ->  C:\Apache\xerces-src-31
>
> --- Here is a batch file to launch Microsoft VS .NET ---
>
> :: Choose the Xerces Source Release
>
> :: SET SRCDIR=xerces-src-28
> :: SET SRCDIR=xerces-src-27
> SET SRCDIR=xerces-src-31
>
> :: Choose the MS VS .NET VC++ Version
>
> :: SET VCVER=VC7.1
> :: SET VCVER=VC8
> :: SET VCVER=VC9
> SET VCVER=VC10
>
> set
> XSOLUTIONFILE=%SRCDIR%\Projects\Win32\%VCVER%\xerces-all\xerces-all.sln
>
> :: Setup Working Environment
>
> SET PATH=%WINDIR%\system32;%WINDIR%;%WINDIR%\system32\wbem
> SET INCLUDE=
> SET LIB=
> SET SOURCE=
>
> if "%VCVER%" == "VC7.1" call "%VS71COMNTOOLS%\vsvars32.bat"
> if "%VCVER%" == "VC8"   call "%VS80COMNTOOLS%\vsvars32.bat"
> if "%VCVER%" == "VC9"   call "%VS90COMNTOOLS%\vsvars32.bat"
> if "%VCVER%" == "VC10"  call "%VS100COMNTOOLS%\vsvars32.bat"
>
> :: Enter the development environment
>
> devenv %XSOLUTIONFILE% /useenv
>
> -----------------
>
> Within visual studio .net
>
> Select the (X64) platform
>
> Select configuration (Release) or (Debug)
>
> Select the project (XercesLib)
>
> and then (Build) or (Rebuild)
>
> -----------------
>
> The LNK1112 error above is issued.
>
> When using the (Win32) platform, all goes well.
>
> I can use some guidance on how to build the X64 library.
>
> Sincerely,
> Steven J. Hathaway
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: c-dev-help@xerces.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org