scew-users
[Top][All Lists]
Advanced

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

[scew-users] Re: help installing SCEW (can't find expat.h)


From: Aleix Conchillo Flaqué
Subject: [scew-users] Re: help installing SCEW (can't find expat.h)
Date: Tue, 21 Sep 2010 16:46:06 +0200

On Tue, Sep 21, 2010 at 16:21, Josh Wilkie <address@hidden> wrote:
> Hello Alex,
>
> Yes, that worked... thanks.  So I started a test to try writing an xml
> file following the scew_write example.  One thing I had to do was
> change all the references to <expat.h> (in the various scew headers)
> to the path that I am using for expat.

This should not be necessary at all. You should tell the compiler
where it should find the Expat and SCEW header. This is done by
providing the -I flag, like this:

gcc -I/path/to/expat/header -I/path/to/scew/header ....

So,, modifying SCEW headers should not be necessary. Note that the
-Ipath argument allows you to use a header file like #include
<headerXXX.h>. Otherwise it would be a nightmare to modify all your
libraries and correct the path for all of them.

I would highly recommend to leave SCEW library (and others you need)
as it comes.

> After I did that I could
> compile.  Then I added a function that writes a xml file same as the
> example.  It will compile but fails at the linking phase:
>
> ../bin/ambersip.elf2flt: In function `_initXMLSettings':
> (.text+0x260): undefined reference to `_scew_tree_create'
[snip]
> I guess the linker doesn't have the correct path to the scew library.
> Not sure how to set this.
>

Right. Once you have successfully compiled SCEW, you need to tell the
compiler and liker of your application to use SCEW. This is done by
passing the -L and -l arguments to gcc:

gcc -I/path/to/expat/headers -I/path/to/scew/headers
-L/path/to/scew/lib -lscew .....

Hope this helps. Let me know if it works. If not, please provide how
you use gcc and where is scew installed...etc.

By the way, why don't you install both libraries? Everything would be
very straight forward Don't you have root access?

Best regards,

Aleix



reply via email to

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