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 / 2849
2848  |  2850
Subject: 
Re: Winliblnp problems
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Tue, 10 Sep 2002 23:40:27 GMT
Viewed: 
2497 times
  
In lugnet.robotics.rcx.legos, Tim Auton writes:
From: "Tim Auton" <tim.lugnet@uton.org>
Sent: Friday, September 06, 2002 4:07 PM
I recently downloaded winliblnp, the port by Michael Bunk of liblnp to
windows. Exactly what I needed, thanks Michael.

Unfortunately, I'm rather new to VC++ and I can't get it to compile • [snip]
I get the error message
CamStandDlg.obj : error LNK2001: unresolved external symbol "enum
lnp_init_result  __cdecl lnp_init(char *,unsigned short,unsigned
char,unsigned char,int)" (?lnp_init@@YA?AW4lnp_init_result@@PADGEEH@Z)

Anybody know what I'm missing?

I do, it's a namespace problem, down to you working in a C++ project and
winliblnp being in C. I suggest a quick and dirty hack of creating a
duplicate liblnp.h (called, say liblnpcpp.h) with extern "C" in front of all
the function declarations

The usual method is to put the following near the top of the .h file:

#ifdef __cplusplus
extern "C" {
#endif

and the following at the bottom:

#ifdef __cplusplus
}
#endif

This eliminates the need for 2 .h files. HTH.

ROSCO



Message is in Reply To:
  Re: Winliblnp problems
 
From: "Tim Auton" <tim.lugnet@uton.org> Sent: Friday, September 06, 2002 4:07 PM (...) [snip] (...) I do, it's a namespace problem, down to you working in a C++ project and winliblnp being in C. I suggest a quick and dirty hack of creating a (...) (22 years ago, 10-Sep-02, to lugnet.robotics.rcx.legos)

8 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