[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: please help: cannot link c-library into kde-program
From:       Roberto Alsina <ralsina () unl ! edu ! ar>
Date:       1999-12-19 16:15:23
[Download RAW message or body]

On Sun, 19 Dec 1999, claus wilke wrote:

> Hi,
> 
> this is probably a stupid question, but since I cannot resolve it with the gcc
> man pages, I am asking this on this list. There are certainly people here who
> know the answer.
> 
> I have a c-library that I want to link into a kde-program. However, gcc doesn't
> recognize the symbols in the library. Any -l<libname> and -L<path to the
> library> doesn't help. Even giving the library directly as an input file name
> in addition to the object files does not help. So I assume that c-libraries are
> somewhat different from c++ libraries and cannot simply be linked together. How
> can I resolve this?

Probably that library's header files are lacking this:

#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif

:
: The prototypes and stuff goes here
:

#if defined(__cplusplus) || defined(c_plusplus)
}
#endif 

 ("\''/").__..-''"`-. .         Roberto Alsina
 `9_ 9  )   `-. (    ).`-._.`)  ralsina@unl.edu.ar
 (_Y_.)' ._   ) `._`.  " -.-'   Centro de Telematica
  _..`-'_..-_/ /-'_.'           Universidad Nacional del Litoral
(l)-'' ((i).' ((!.'             Santa Fe - Argentina
                                KDE Developer (MFCH)
Not mad, but bound more than a madman is (Romeo and Juliet, Act I Scene II)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic