[GCC-XML] VCToolkit

Andreas Eriksson aeriksson at gmail.com
Wed Dec 29 16:14:18 EST 2004

> Hi.  Could somebody point me to information how to install GCC_XML
> with Microsoft VCToolkit?

I don't know if this is what you're looking for but I have developed a
patch to compile and use gcc_xml using the free VC toolkit and the
free Platform SDK. The patch was developed for CableSwig 1.8 which
includes gcc_xml but seems to work against the current version
aswell. The patch isn't 100% refined and I have only tested it on my
computer but it seems to work fine for me...

The instructions below assumes that you are building gcc_xml as part
of CableSwig because that it what I have been doing. However, it might
work fine directoy against gcc_xml if you apply the patch from the
gcc_xml root using "patch -p2 <vcfreepatch041229.txt"

Go to http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ and
install the Windows Server 2003 SDK. Only the "Core SDK" is needed but
unless you remove the odbc-libraries (carefull, each library seems to
appear twice!) from the CMAKE_STANDARD_LIBRARIES value in CMake you
also need the "MDAC SDK"

Go to http://msdn.microsoft.com/visualc/vctoolkit2003/ and install the
VCToolkit compiler.

Create/set the following environment variables:

MSVC=[VC++ install dir]
MSSDK=[Platform SDK install dir]

Install cygwin if you don't yet have it. It is needed to apply this
patch and by gccxml since it uses it to patch some Visual C++ include

Copy the attached patch-file to the cableswig root. Start cygwin and
cd to the cableswig root and do "patch -p1 <vcfreepatch041229.txt"

The following two steps should have nothing to do with this patch but
seems to be needed anyway...

Rename the file SWIG/NEW to NEWS or similar. Otherwise it gets
included by #include <new> instead of the real new file since Windows
is not case sensitive. 

Start CMake (don't use the cygwin CMake version) enable "Show advanced
values" and change CMAKE_C_FLAGS_RELEASE from "/MT /O2" to "/MT /Og
/Ot /Oy /Ob2 /Gs /GF /Gy" since the /O2 optimization flag enables the
/Oi option which results in the error "intrinsic function cannot be
defined" when compiling the file memcmp.c. (For other build types
change the corresponding CMake value to ensure that /Oi is
disabled. The DEBUG and MINSIZEREL build types probably don't require
any changes). Set "Build For" to "NMake Makefiles".

Now, you're ready to do configure in CMake and after that do "nmake"
from the CableSwig root to start the build process!

I hope that this helps!
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vcfreepatch041229.txt
URL: <http://public.kitware.com/pipermail/gccxml/attachments/20041229/1653dbb4/attachment.txt>

More information about the gccxml mailing list