Re: Need help in fixing a gcc error

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

 



On Fri, May 23, 2008 at 3:20 PM, Eljay Love-Jensen <eljay@xxxxxxxxx> wrote:
>
>
>
> Hi ying lcs,
>
>> I suspect that when I compile TestGtkEmbed, i am not linking against
>> A.o and that results in the 'undefined reference to `A::getA()'  that
>> i saw.
>> Is that right?
>
> You are correct.  You are not linking against A.o, you are only linking
> against TestGtkEmbed.o (and a lot of libraries, some of them more than
> once).
>
>> If yes, can you please tell me how to fix it?
>
> Add A.o to the link line.
>
> HTH,
> --Eljay
>

Thank  you for your help.  I tried added the full path of A.o when I make


-lXfixes -lgobject-2.0 -lglib-2.0  -lglib-2.0     -lgnet-2.0
-l/home/yinglcs/gtk/src/A.o


But I get this new error:

/usr/bin/ld: cannot find-l/home/yinglcs/gtk/src/A.o

But I am sure that A.o is there when I did a 'ls -la'


$ ls -la /home/yinglcs/gtk/src/A.o
-rw-r--r-- 1 scheung scheung 11876 2008-05-23 15:19
/home/yinglcs/gtk/src/A.o

Can you please provide any more insight?

Thank you.


>

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux