To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1391
1390  |  1392
Subject: 
Statically and Dynamically linking lnp ....
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 26 Aug 2000 14:21:34 GMT
Viewed: 
1189 times
  
Hi All,

I was wondering if someone could give me a quick guide
as to the compilation/linking options when using
liblnp.h etc. I'm having a few difficulties.

I wanted to know how exactly to link in the shared library.
I tried installing it in the standard /lib and running
ldconfig (as root) on that dir to recognise it, I also tried
pointing to the directory containing it using the
$LD_LIBRARY_PATH env variable, but neither have worked:

I have referenced the liblnp.h in a c++ source file (which
I'm using to wrap LNP functionality) and then compiled it
sucessfully, but when I try to link it to my main() class,
in my make environment, I get:

simpleLNPTransport.o: In function
`simpleLNPTransport::simpleLNPTransport(void)':
simpleLNPTransport.o(.text+0x81): undefined reference to `lnp_init(char *,
unsigned short, unsigned char, unsigned char, int)'
simpleLNPTransport.o: In function `simpleLNPTransport::sendCORBA(unsigned char
const *&, unsigned char)':
simpleLNPTransport.o(.text+0x101): undefined reference to
`lnp_addressing_write(unsigned char const *, unsigned char, unsigned char,
unsigned char)'
simpleLNPTransport.o: In function `simpleLNPTransport::sendControl(unsigned
char const *&, unsigned char)':
simpleLNPTransport.o(.text+0x176): undefined reference to
`lnp_addressing_write(unsigned char const *, unsigned char, unsigned char,
unsigned char)'
collect2: ld returned 1 exit status
make: *** [nanOrbServer] Error 1

simpleLNPTransport is my cpp class file.


Thanks in advance,

Colin Ryan



Message has 1 Reply:
  Re: Statically and Dynamically linking lnp ....
 
Regarding the previous posting: Please disregard ... I figured it out, but thought it may be useful to post a reply to myself, in case it's ever of use to anyone else using the same tools: I forgot to wrap my include in an ' extern "C" ' block. As I (...) (24 years ago, 26-Aug-00, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR