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 / 2937
2936  |  2938
Subject: 
I solved a small problem in lnp :-)
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 4 Nov 2002 15:37:02 GMT
Viewed: 
2902 times
  
Hi :-)

The problem is:

  When compiling programs made in language 'C++' using:
  # g++ myprogram.c -llnp

  The g++ would not compile and the follow messages appeared:
  /tmp/ccXFr7VZ.o: In function `main':
  /tmp/ccXFr7VZ.o(.text+0x95): undefined reference to `lnp_init(char *, unsigned short, unsigned char, unsigned char, int)'
  /tmp/ccXFr7VZ.o(.text+0xd7): undefined reference to `lnp_integrity_write(unsigned char const *, unsigned char)'
  collect2: ld returned 1 exit status


Solving the problem :-)

1- Edit the file ItsDir/lnpd+liblnp/liblnp/stub.c
     Add the line:
     #define F_SETSIG  10

     Change all occurrences of:
     rcv_state++;
     by
     (*(int *)&rcv_state)++;

2- Edit the file ItsDir/lnpd+liblnp/liblnp/Makefile
     Change all occurrences of:
     'gcc' by 'g++'

3- Write:
     $ make realclean
     $ make

That's it, now you may compile all programs written
in 'C++' language.


--
[]s
Tavares



1 Message 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