[xsd-users] Undefined reference error
Boris Kolpackov
boris at codesynthesis.com
Wed Dec 10 15:34:24 EST 2008
Hi David,
David White <dawhite32 at gmail.com> writes:
> Try to compile using gcc-built xerces library:
> 1. Download xerces-c-3.0.0 source.
> 2. Configure and make using MinGW and MSYS, via:
>
> $ export XERCESROOT="D:\\downloads\\xerces\\xerces-c-3.0.0\\"
> $ ./configure --enable-transcoder-windows --host=i686-mingw32
> LDFLAGS=-no-undefined CPPFLAGS="-DXERCES_BUILDING_LIBRARY
> -DXERCES_USE_TRANSCODER_WINDOWS -DXERCES_USE_WIN32_MSGLOADER
> -DXERCES_USE_NETACCESSOR_WINSOCK -DXERCES_USE_FILEMGR_WINDOWS
> -DXERCES_USE_MUTEXMGR_WINDOWS -DXERCES_PATH_DELIMITER_BACKSLASH
> -DHAVE_STRICMP -DHAVE_STRNICMP -DHAVE_LIMITS_H -DHAVE_SYS_TIMEB_H
> -DHAVE_FTIME -DHAVE_WCSUPR -DHAVE_WCSLWR -DHAVE_WCSICMP -DHAVE_WCSNICMP"
> (see attached run_config)
>
> NOTE: Followed instructions in
> http://xerces.apache.org/xerces-c/build-3.html
> NOTE: Preprocessor definitions obtained from MSVC8 vcproj file
> NOTE: xerces-c-3.0.0 compiles with no errors.
I think your problem is with the Xerces-C++ build. First of all,
you don't need any of the preprocessor defines -- the build system
will determine which ones are required automatically (and by defining
those that are not required, you can actually end up with a broken
build).
Secondly, I suggest that you start with a static library since it
appears that MinGW has problems with DLL building more often than
not. If that works, you can try to build a DLL and see how it goes.
So to build libxerces-c.lib, do the following (you don't need to
set XERCESROOT anymore):
$ ./configure --disable-shared LDFLAGS=-no-undefined
$ make
Let me know if this doesn't help.
Boris
More information about the xsd-users
mailing list