Compiling Xerces-C under MinGW

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling Xerces-C under MinGW

Benjamin Ducke-2
Hi,

I am trying to compile GDAL 1.5 under MinGW with some additional
dependencies/
supported formats.

Did anyone here get Xerces-C to compile and work under MinGW.
It compiles fine (as a static lib) for me, but the GDAL 1.5 configure
script won't be able to compile the little test program, aborting with this:

C:/DOCUME~1/bart/LOCALS~1/Temp/cck1aaaa.o: In function
`ZN11xercesc_2_810XMLDeleterD1Ev':
C:/msys/1.0/local/include/xercesc/util/PlatformUtils.hpp:851: undefined
reference to `xercesc_2_8::XMLUni::fgXercescDefaultLocale'
C:/msys/1.0/local/include/xercesc/util/PlatformUtils.hpp:851: undefined
reference to `xercesc_2_8::XMLPlatformUtils::Initialize(char const*, char
const*, xercesc_2_8::PanicHandler*, xercesc_2_8::MemoryManager*, bool)'
collect2: ld returned 1 exit status


(Note the library is present and the symbols in questions are in there!).

Suggestions,

anyone?

Thanks,

Benjamin

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Xerces-C under MinGW

Benjamin Ducke-2
In reply to my own question:

I figured out how to create valid Xerces-C DLLs on MinGW.
In case anyone needs this information for a later build:

I am keeping my source code in /src, where I also download
the tgz file from the Xerces project page:

***

export XERCESCROOT=/src/xerces-c-src_2_8_0

cd /src

tar -xzf xerces-c-src_2_8_0.tar.gz

cd xerces-c-src_2_8_0/src/xercesc

./runConfigure -p mingw-msys -c gcc -x g++ -n fileonly -r none -z
-mno-cygwin -C --host=i686-mingw32

Before we can run make, we need to fix some of the Makefiles a little bit
(we need to add an extra colon in some places).

In file C:\msys\1.0\src\xerces-c-src_2_8_0\src\xercesc\Makefile.incl, near
the top, change

ALL: all

to

ALL:: all

In file
C:\msys\1.0\src\xerces-c-src_2_8_0\src\xercesc\util\Makefile.util.submodule,
near the top, change

all: includes $(CPP_OBJECTS)

to

all:: includes $(CPP_OBJECTS)

In file C:\msys\1.0\src\xerces-c-src_2_8_0\obj\Makefile you will find the
following definition at line 104:

all: ${FQ_REAL_NAME} ${FQ_REAL_DEPDOM}

Change it to read:

all:: ${FQ_REAL_NAME} ${FQ_REAL_DEPDOM}

Now the source code can be compiled (There will be many warnings. You can
safely ignore them):

make

make install

This will create the Windows DLLs and copy them and all header files into
/usr/local.

***

This was done using MinGW 5.1.3, MSYS 1.0.11 (latest) and
GNU Make 3.81.

Maybe this will be useful for someone else in the future.

Best,

Benjamin


[hidden email] wrote:
> Hi,
>
> I am trying to compile GDAL 1.5 under MinGW with some additional
> dependencies/
> supported formats.
>
> Did anyone here get Xerces-C to compile and work under MinGW.
> It compiles fine (as a static lib) for me, but the GDAL 1.5 configure
> script won't be able to compile the little test program, aborting with
this:

>
> C:/DOCUME~1/bart/LOCALS~1/Temp/cck1aaaa.o: In function
> `ZN11xercesc_2_810XMLDeleterD1Ev':
> C:/msys/1.0/local/include/xercesc/util/PlatformUtils.hpp:851: undefined
> reference to `xercesc_2_8::XMLUni::fgXercescDefaultLocale'
> C:/msys/1.0/local/include/xercesc/util/PlatformUtils.hpp:851: undefined
> reference to `xercesc_2_8::XMLPlatformUtils::Initialize(char const*, char
> const*, xercesc_2_8::PanicHandler*, xercesc_2_8::MemoryManager*, bool)'
> collect2: ld returned 1 exit status
>
>
> (Note the library is present and the symbols in questions are in there!).
>
> Suggestions,
>
> anyone?
>
> Thanks,
>
> Benjamin
>
> _______________________________________________
> Qgis-developer mailing list
> [hidden email]
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>

--
Benjamin Ducke
Senior Applications Support and Development Officer

Oxford Archaeological Unit Limited
Janus House
Osney Mead
OX2 0ES
Oxford, U.K.

Tel.: ++44 (0)1865 263 800
[hidden email]




_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Xerces-C under MinGW

beltegeuse
Hello,

Many thanks. We have the same trouble. By following your instructions, all works.

Best regards.
Adrien

Benjamin Ducke wrote
In reply to my own question:

...

_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.qgis.org
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer