[xsd-users] cannot compile hello cygwin

Schmilinsky, Remsy Remsy.Schmilinsky at ccra-adrc.gc.ca
Fri Aug 4 14:50:59 EDT 2006


Ok, so I had to copy the xerces folder and xsd (the .h files) to
/usr/include, also libxerces-c.a into /usr/lib. At the end, I get the
following errors coming from xerces (linkage errors). thanks for your
patience !

$ make
g++ -I../../../../libxsd -W -Wall -c driver.cxx -o driver.o
g++ -W -Wall  -o driver driver.o -lxerces-c
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x54e): undefined reference to `_st
ricmp'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x5a2): undefined reference to `_st
rnicmp'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0xcba): undefined reference to `_st
rnicmp'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0xe19): undefined reference to `__i
mp___pctype'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0xe34): undefined reference to `__i
sctype'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0xe5a): undefined reference to `__i
mp___pctype'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0xe75): undefined reference to `__i
sctype'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x27b7): undefined reference to `__
errno'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x282d): undefined reference to `__
errno'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x2bb3): undefined reference to `__
errno'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLString.o):XM
LString.cpp:(.text+0x2cde): undefined reference to `__
errno'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(DefaultPanicHan
dler.o):DefaultPanicHandler.cpp:(.text+0x1e): undefine
d reference to `__imp___iob'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XSValue.o):XSVa
lue.cpp:(.text+0x4b62): undefined reference to `__errn
o'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XSValue.o):XSVa
lue.cpp:(.text+0x4c82): undefined reference to `__errn
o'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XSValue.o):XSVa
lue.cpp:(.text+0x4d34): undefined reference to `__errn
o'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XSValue.o):XSVa
lue.cpp:(.text+0x4e07): undefined reference to `__errn
o'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLAbstractDoub
leFloat.o):XMLAbstractDoubleFloat.cpp:(.text+0x11ba):
undefined reference to `__errno'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libxerces-c.a(XMLAbstractDoub
leFloat.o):XMLAbstractDoubleFloat.cpp:(.text+0x12b6):
more undefined references to `__errno' follow
collect2: ld returned 1 exit status
make: *** [driver] Error 1

-----Original Message-----
From: Boris Kolpackov [mailto:boris at codesynthesis.com]
Sent: August 4, 2006 2:33 PM
To: Schmilinsky, Remsy
Cc: xsd-users at codesynthesis.com
Subject: Re: [xsd-users] cannot compile hello cygwin


Hi Remsy,

I've CC'ed xsd-users back; someone may find this information useful.

Schmilinsky, Remsy <Remsy.Schmilinsky at ccra-adrc.gc.ca> writes:

> I see. can you explain how to fix this with the first approach? that
is,
> using relative paths or cygpath. In the future I am concentrating on
> linux, but I need cygwin for the moment.

One way to do this is to grab one of the pre-compiled XSD distributions,
for example one for gnu-linux, and replace the linux xsd binary with the
one you've just built. Then cd to examples and say 'make'.

This will work because the simple makefiles we supply for examples in
the pre-compiled distributions use relative paths to compile schemas.


hth,
-boris




More information about the xsd-users mailing list