There are two different things.
a) compiling sablotron itself (including sabcmd)
b) compiling third-party programs, and dynamic linking of sablotron
Our configure script and makefiles cover only the first topic. Your
sabcmd works fine, doesn't?
The other problem is linking of your programs. To link program with
shared libraries successfully, all used libraried have to mentioned
1) using -l switch while linking program
2) using -l switch while linking used shared libraries
hmm... I should explain it...
libsablot uses libxmlparse a libxmltok libraries, but this dependence is
*not* solved while linking libsablot. In other words, libsablot do not
know anything about libxmlparse and libxmltok.
This would cause the problem with sabcmd linking (program have to
resolve all references), so our makefile specifies all shared libs
(libsablot, libxmlparse, libxmltok) while linking sabcmd.
All third party programs have to do the same thing. (XML::Sablotron
actually does it).
Your makefile sould look like this
myprog:
gcc -o myprog -lsablot -lxmlparse -lxmltok myprog.c
Sterling Hughes wrote:
> > There i sno need for original expat files.
> >
> > You try to link your own code with Sablotron. OK?
> >
> > Note, that Sablotron has unresolved links to Expat API, in other words,
> > expat libs are *not* given with -l switch while linking Sablotron.
> >
> > All programs using sablotron have to specify:
> > -lsablot -lxmlparse -lxmltok
> >
> > It may look like an obsolete complication, but we managed linking in
> > this way to enable linking of another Expat installations (possibly renamed)
> >
> > regards
> >
> > Pavel
> >
>
> Hmmm, its odd though, other people were not having any problems linking my code
> with the same code Makefile and config file? It worked fine for me once I
> custom compiled expat and put it in /usr/local/lib though?
>
> I'm not really good at this stuff, so I may have just repeated what you've said
> without knowing it.
>
> -Sterling
>
--
Pavel Hlavnicka
Ginger Alliance Ltd.
Prague; Czech Republic