Re: [Anjuta-list] multiple-target builing order in anjuta 2.0



>> Brief: how to tell Anjuta2 in which order to build my targes?
>>
>>     
> Remove the two groups (dirs) and add them again in right order. Or just
> edit the Makefile.am and put them in order in SUBDIRS.
>
> Regards,
> -Naba
>
>   
Thanks Naba,

Reordering the entries in SUBDIR works to solve the building
order problema, as you've suggsted.   Now a second issue:

in the final step, when gcc is invoked to kink the binary agains
the library, it again makes it in the wrong order. See below.
For that to work, -lfoo would have to appear after main.o;
the way it is, instead, -lfoo causes the linker to scan for the
library before the binary where the symbols are referenced,
so it does not look for the simble foo.

I have entered '-lfoo'  for the Library Flags field in the foobar's
Target Proprieties diolog.  How to force it be used by the
end of the line? Or after the target?


make[2]: Leaving directory `/home/monaco/Projects/foobar/foo'
Making all in src
make[2]: Entering directory `/home/monaco/Projects/foobar/src'
gcc -Wall -g -g -O2  -L../foo -o foobar -lfoo  main.o
main.o: In function `main':
/home/monaco/Projects/foobar/src/main.c:32: undefined reference to `foo'
collect2: ld returned 1 exit status

Once more
Thank you very much

[]s monaco




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