swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swarm-Support] Using Expat XML Parser In CYGWIN


From: William Adam
Subject: [Swarm-Support] Using Expat XML Parser In CYGWIN
Date: Wed, 03 Sep 2003 16:42:48 +0100

Hi,

we are using an XML parser called Expat and Expatobjc (reference 
http://expat.sourceforge.net) to read in parameter files to our model.  We 
encountered no problems under Solaris.

However, there are problems when compiling under Cygwin (version shipped with 
swarm 2.1.1) when using exactly the same model code.
When installing expat the following settings were used :
CPPFLAGS=-I/usr/local/include 
LDFLAGGS=-L/usr/local/lib
./configure -enable-shared=no

We can get Expat and Expatobjc working separately.

The makefile is as follows :

ifeq ($(SWARMHOME),)
SWARMHOME=../swarm-2.1.1
endif
APPLICATION=TestRun005
APPVERSION=1.0
address@hidden
OBJECTS=Test005ParseRun.o StringKeyedHashElement.o StringKeyedHashTable.o 
TestHashTableData.o FearlusXMLElement.o FearlusXMLParseTree.o 
FearlusXMLParser.o FearlusXMLString.o
TMPFILE=tmp
EXTRACPPFLAGS=-I /usr/local/include
EXTRALIBS=-lexpat -lexpatobjc
EXTRALDFLAGS= -L/usr/local/lib -R/usr/local/lib

include $(SWARMHOME)/etc/swarm/Makefile.appl
include $(OBJECTS:.o=.d)

%.d: %.m
        gcc -w -E -MMD $< > /dev/null
        mv -f $@ $(TMPFILE)
        sed -e 's/:/ $@:/' $(TMPFILE) > $@
        rm -f $(TMPFILE)

The files libexpat.a and libexpatobjc.a are in the directory usr/local/lib



The compilation report is as follows:

address@hidden/cygdrive/w/FEARLUS/XMLPC] $ make -f Makefile.Test005
/bin/sh /Swarm-2.1.1/bin/libtool-swarm --mode link gcc -g -O2 -L/Swarm-2.1.1/lib
 -rpath /Swarm-2.1.1/lib -L/usr/local/lib -R/usr/local/lib  -o TestRun005.exe Te
st005ParseRun.o StringKeyedHashElement.o StringKeyedHashTable.o TestHashTableDat
a.o FearlusXMLElement.o FearlusXMLParseTree.o FearlusXMLParser.o FearlusXMLStrin
g.o  -lswarmdll -lobjcdll  -lexpat -lexpatobjc
gcc -g -O2 -o TestRun005.exe Test005ParseRun.o StringKeyedHashElement.o StringKe
yedHashTable.o TestHashTableData.o FearlusXMLElement.o FearlusXMLParseTree.o Fea
rlusXMLParser.o FearlusXMLString.o -L/Swarm-2.1.1/lib -L/usr/local/lib -lswarmdl
l -lobjcdll /usr/local/lib/libexpat.a /usr/local/lib/libexpat.a -lexpatobjc -Wl,
--rpath -Wl,/Swarm-2.1.1/lib -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/Swa
rm-2.1.1/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/local/lib/libexpatobjc.a(XMLParser.o.b): In function `end_prefix_mapping_ha
ndler':
/fearlus/expat/expatobjc-1.0/XMLParser.m:117: undefined reference to `__objc_cla
ss_name_Object'
collect2: ld returned 1 exit status
make: *** [TestRun005.exe] Error 1

Is there a problem mixing objective C objects with Swarm objects - perhaps ?

many thanks for any guidance you can offer,
William

William Adam
Computer Applications Development Specialist
The  Macaulay Institute
Craigiebuckler
Aberdeen 
AB15 8QH
Scotland, UK

Tel: 01224 498200 Ext 2243
Fax: 01224 311556
e-mail: address@hidden
http://www.macaulay.ac.uk 




Attachment: William Adam.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]