undefined reference to libbsdport_netdriver_attach
SAeeD
salpha.2004 at gmail.com
Mon Oct 1 12:01:05 UTC 2012
Hoorra!
I found the problem:
Somehow, those "-L /where/libbsdport/was/installed -lbsdport" should be
placed after init.o. That is:
i386-rtems4.10-gcc --pipe
-B/home/saeed/RTEMS/src/rtems-4.10.2/b-pc386/bsp-install/i386-rtems4.10/pc386/lib/
-specs bsp_specs -qrtems -g -Wall -O2 -g -g -mtune=i386
-Wl,-Ttext,0x00100000 -mtune=i386 -o o-optimize/network-suite.exe
o-optimize/init.o -lbsdport
-L/home/saeed/RTEMS/src/rtems-4.10.2/b-pc386/bsp-install/i386-rtems4.10/pc386/lib
I do it manually now. I mean after a call to "make", I encounter
"undefined..." error and manually enter the above command. I dunno if there
is a way to embed this preference in Makefile.
I hope it would help someone in the future! :)
SAeeD
On Mon, Oct 1, 2012 at 2:31 PM, SAeeD <salpha.2004 at gmail.com> wrote:
> Ok I linked my application with the following LDFLAGS:
>
> LDFLAGS += -L /where/libbsdport/was/installed -lbsdport
>
> But I'm getting the same "undefined reference to
> 'libbsdport_netdriver_attach'" error again.
> What could be the possible problem?
>
> Thanks,
> SAeeD
>
>
> On Fri, Sep 28, 2012 at 7:20 PM, SAeeD <salpha.2004 at gmail.com> wrote:
>
>> Did you add -lbsdports to the list of libraries you must link with ?
>>>
>>
>> I added this option to LDFLAGS section and this is the new link error I
>> encounter:
>> i386-rtems4.10-gcc --pipe
>> -B/home/saeed/RTEMS/src/rtems-4.10.2/b-pc386/bsp-install/i386-rtems4.10/pc386/lib/
>> -specs bsp_specs -qrtems -g -Wall -O2 -g -g -mtune=i386
>> -Wl,-Ttext,0x00100000 -lbsdports -mtune=i386 -o
>> o-optimize/network-suite.exe o-optimize/init.o
>> /opt/rtems-4.10/lib/gcc/i386-rtems4.10/4.4.7/../../../../i386-rtems4.10/bin/ld:
>> cannot find -lbsdports
>> collect2: ld returned 1 exit status
>> make: *** [o-optimize/network-suite.exe] Error 1
>>
>> I doubt that I've added the option correctly to my Makefile. I've
>> attached my Makefile.
>>
>> Regards,
>> SAeeD
>>
>> On Fri, Sep 28, 2012 at 2:13 AM, Chris Johns <chrisj at rtems.org> wrote:
>>
>>> SAeeD wrote:
>>>
>>>>
>>>> Is there any link options that I must add to my application's Makefile?
>>>>
>>> >
>>>
>>> Did you add -lbsdports to the list of libraries you must link with ?
>>>
>>> Chris
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20121001/cfe8ec86/attachment-0001.html>
More information about the devel
mailing list