automake
[Top][All Lists]
Advanced

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

RE: Cannot see CFLAGS


From: Hongliang Wang
Subject: RE: Cannot see CFLAGS
Date: Tue, 23 Oct 2007 08:01:28 +0000

> CC: address@hidden
> From: address@hidden
> Subject: Re: Cannot see CFLAGS
> Date: Mon, 22 Oct 2007 18:56:22 +0200
> To: address@hidden
>
> On Oct 22, 2007, at 5:07 PM, Hongliang Wang wrote:
>
>> Hello, all.
>>
>> I built two libraries in two directories (gen and ora) respectively
>> and now are building the executable program in "util" directory
>> linked against the previous libraries. However, errors arise when
>> compling.
>>
>> address@hidden> make
>> make all-recursive
>> make[1]: Entering directory `/export/guam/jigsaw/dev/jhwgu/src/jz'
>> Making all in gen
>> make[2]: Entering directory `/export/guam/jigsaw/dev/jhwgu/src/jz/gen'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory `/export/guam/jigsaw/dev/jhwgu/src/jz/gen'
>> Making all in ora
>> make[2]: Entering directory `/export/guam/jigsaw/dev/jhwgu/src/jz/ora'
>> make[2]: Nothing to be done for `all'.
>> make[2]: Leaving directory `/export/guam/jigsaw/dev/jhwgu/src/jz/ora'
>> Making all in util
>> make[2]: Entering directory `/export/guam/jigsaw/dev/jhwgu/src/jz/
>> util'
>> gcc -g -O2 -o zizzy -ggdb `pkg-config --libs glib-2.0` zizzy-
>> main.o zizzy-dictionary.o zizzy-dump.o zizzy-zop.o ../gen/
>> libzizzy.a ../ora/libzizora.a -lm
>> ../ora/libzizora.a(zizoraread.o)(.text+0x50): In function
>> `ZOraLogFileClose':
>> /home/jigsaw/dev/jhwgu/src/jz/ora/zizoraread.c:197: undefined
>> reference to `ZFClose'
>
> [more undefined references]
> Your undefined references come from the libzizora.a, are you sure
> you're linking the libraries in the right order? The most dependent
> libraries have to go first. So if, say, libzizora.a use things from
> libzizzy.a, it must appear beforehand on the link command. If the
> problem is not related to linking order, then can you tell us where
> are defined the various missing symbols?

Ok,  I reversed the order and it works!

Thank you very much!
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline



reply via email to

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