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: Josh Wilkie
Subject: [scew-users] Re: help installing SCEW (can't find expat.h)
Date: Tue, 21 Sep 2010 12:22:00 -0400

Hi Aleix,

Ok, I added the CFLAGS, LDFLAGS, and LDLIBS to my makefile for my app,
but I now get this error:

/usr/cr16-tools/lib/gcc/cr16-uclinux/4.1.2/../../../../cr16-uclinux/bin/ld.real:
 skipping incompatible ../../xml/lib/libscew.a when searching for -lscew
/usr/cr16-tools/lib/gcc/cr16-uclinux/4.1.2/../../../../cr16-uclinux/bin/ld.real:
 cannot find -lscew

it seems to think libscew.a is incompatible?
Right, I do not have root access.  the CC I am using is cr16-uclinux-gcc.

-Josh

On Tue, Sep 21, 2010 at 10:46 AM, Aleix Conchillo Flaqué
<address@hidden> wrote:
> 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]