[xsde-users] Building xsde.lib in x64 Windows

Nikita Visnevski nikita_visnevski at hotmail.com
Wed Feb 27 11:45:23 EST 2013


Boris, thanks.  I think it worked.  I have not tested it yet, but compiling succeeded in both debug and release modes.

Here are some details for those who might be interested in replicating this build:
I used Visual Studio 2010 Express with SDK 7.1.  Do not try to use Visual Studio Express command line tool chain.  It is broken for any architecture other than x86.  Use SDK 7.1 command prompt and the setenv command to set your command line build environment.  I used "setenv /Release /x64" for the release build and "setenv /Debug /x64" for a debug build.I made some more modifications in the config.nmake file for windows.  The most notable ones are "LDFLAGS = /nologo /machine:X64".  Also, I passed _DEBUG and NDEBUG flags for Debug and Release configurations.  I always do that in all my projects.  Not sure if it does anything in XSD/e build.  I use WIN32 flag and "win32" XSDE_PLATFORM setting.  I find it a bit confusing, but I noticed that lots of other library vendors do the same for both x86 and x64 builds, so it appears to be a default Microsoft thing. Also, I set the "XSDE_ARCH_WIDTH   = 64".  Boris, if you have any comments on this setup, they are very much appreciated.  Here is the top portion of the config.nmake that I used:

# Toolchain.
#
CC       = cl.exe
CFLAGS   = /nologo /W3
CPPFLAGS = -D_CRT_SECURE_NO_DEPRECATE# Sample configuration file for Windows CE 4.2 on X86 using Visual Studio
# 2008 with Smart Devices support. This configuration enables STL, iostream,
# RTTI, and C++ exceptions. See config-min.nmake for a minimal configuration
# with all these options disabled.
#

# Toolchain - Debug
#
#CC       = cl.exe
#CFLAGS   = /nologo /W3 /Od /MTd /GS-
#CPPFLAGS = /D_DEBUG /DWIN32 /D_CRT_SECURE_NO_WARNINGS /D_UNICODE /DUNICODE

#CXX      = cl.exe
#CXXFLAGS = /nologo /W3 /Od /GR /MTd /GS-

#LD       = link.exe
#LDFLAGS  = /nologo /machine:X64
#LIBS     = /nodefaultlib:"LIBCMT"

#AR       = lib.exe
#ARFLAGS  = /nologo

# Toolchain - Release
#
CC       = cl.exe
CFLAGS   = /nologo /W3 /O1 /MT /GS-
CPPFLAGS = /DNDEBUG /DWIN32 /D_CRT_SECURE_NO_WARNINGS /D_UNICODE /DUNICODE

CXX      = cl.exe
CXXFLAGS = /nologo /W3 /O1 /GR /MT /GS-

LD       = link.exe
LDFLAGS  = /nologo /machine:X64
LIBS     = /nodefaultlib:oldnames.lib

AR       = lib.exe
ARFLAGS  = /nologo

# Common XSD/e flags.
#
XSDFLAGS = --generate-inline


# Platform. Valid values are:
#
# 'wince'  - Windows CE
# 'win32'  - Windows 2000, XP, etc.
# 'posix'  - POSIX OS, including UNIX/Linux, VxWorks, etc.
#
XSDE_PLATFORM     = win32


# Platform architecture width in bits.
#
XSDE_ARCH_WIDTH   = 64

[ ... ]  




On the side note, I have been using XSD/e for over a year in some internal R&D projects at the company.  I built it into a Simulink library and am running it successfully on MathWorks XPC Target real time platform (a flavor of RTOS 32, if you are not familiar with it).  I have to admit that the library works extremely well and I am very happy with it.  If we ever productize the internal stuff that we are working on right now, I would pay for a commercial license of XSD/e without any hesitation.  I think it is an excellent product.
Nikita



> Date: Wed, 27 Feb 2013 10:03:30 +0200
> From: boris at codesynthesis.com
> To: nikita_visnevski at hotmail.com
> CC: xsde-users at codesynthesis.com
> Subject: Re: [xsde-users] Building xsde.lib in x64 Windows
> 
> Hi Nikita,
> 
> Nikita Visnevski <nikita_visnevski at hotmail.com> writes:
> 
> > I was wondering if anybody has attempted and succeeded at building xsde.lib
> > for x64 Windows?  Is it possible and what are the compiler settings that are
> > needed?
> 
> I am assuming you are using VC++. Microsoft provides different compiler
> executables for 32 and 64-bit compilation. So to build XSD/e in the 64-
> bit mode all you need to do is:
> 
> 1. Change XSDE_ARCH_WIDTH to 64 in config.nmake
> 
> 2. Open VC++ x64 command prompt (In the Start menu, in the Visual Studio
>    Tools sub-menu, select Visual Studio x64 Cross Tools Command Prompt).
>    Then build just like for 32-bit.
> 
> Boris
 		 	   		  


More information about the xsde-users mailing list