Re: External library linking
Eddie Kohler <[email protected]>
| Newsgroups | gmane.network.routing.click |
|---|---|
| Message-ID | <CAF0C5S+_vFzuP7jv1m=xSP5KfCHSicFOHVneWzRT8YDAaGR6PA@mail.gmail.com> |
(Thanks!) On Thu, Feb 16, 2012 at 4:00 PM, Eddie Kohler <[email protected]> wrote: > This last one (with ns/Makefile) seems like a reasonable thing to add, > so I will add it. > > Eddie > > > On Tue, Feb 14, 2012 at 1:01 PM, Anthony Dempsey > <[email protected]> wrote: >> And I've solved the ns3 problem as well. In ns/Makefile I added $(LIBS) to >> line 110, where the libnsclick.so is generated, and then rebuild Click and >> NS-3 and it works fine after that. >> >> On Tue, Feb 14, 2012 at 3:51 PM, Anthony Dempsey >> <[email protected]>wrote: >> >>> So I fixed my problem first off I didn't need the lib part of libopenfec, >>> that was my lack of knowledge and the second problem was I >>> hadn't surrounded the imported header files from openfec with extern "C"{} >>> as they are C header files instead of C++ header files. >>> >>> I've got one more problem in that it doesn't seem to work with ns-3 but I >>> don't know if the external libraries get linked with ns. >>> >>> On Tue, Feb 14, 2012 at 12:38 AM, Cliff Frey <[email protected]> wrote: >>> >>>> You make need to do a clean rebuild if you added the ELEMENT_LIBS line to >>>> your element more recently. (there is a chance that you can just run 'make >>>> elemlist', but I'm not sure) >>>> >>>> You can run make with V=1 in order to see the actual linker command that >>>> click is using (instead of just seeing LINK). >>>> >>>> Cliff >>>> >>>> On Mon, Feb 13, 2012 at 3:07 PM, Anthony Dempsey < >>>> [email protected]> wrote: >>>> >>>>> Hi I'm having problems linking the openfec library with click. I've >>>>> compiled the openfec to a static .a library. It sees the .hh files I need >>>>> but when ever I try to compile Click it either fails saying it can't find >>>>> the library or tells me there are undefined references to the functions I >>>>> call. >>>>> >>>>> At the bottom of my component I've included >>>>> >>>>> ELEMENT_LIBS(-L~/Documents/openfec/bin/Release -llibopenfec) >>>>> >>>>> but click can't find the file returning >>>>> >>>>> LINK click >>>>> /usr/bin/ld: cannot find -llibopenfec >>>>> collect2: ld returned 1 exit status >>>>> >>>>> when trying to link the files, this is in the userlevel directory. >>>>> >>>>> Is there anything else I need to do to get Click to find the file for me? >>>>> >>>>> Cheers, >>>>> Anthony >>>>> _______________________________________________ >>>>> click mailing list >>>>> [email protected] >>>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click >>>>> >>>> >>>> >>> >> _______________________________________________ >> click mailing list >> [email protected] >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click