This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: g++ linking to gcc compiled libraries


Frederich, Eric P21322 writes:
 > Hello guys.
 > I'm hoping you can tell me what I'm doing wrong here.
 > I have a library written in C that I'd like to link to from both c
 > programs and c++ programs.
 > I'm guessing that this is possible.
 > 
 > If I compile both the library and program using g++ it works fine, but
 > then I can't link to the c library from c programs.
 > 
 > Here is the output of me trying to use g++ to link to a c library
 > compiled with gcc.
 > What am I doing wrong?  Or is it even possible to do?

Have you ever heard of

   extern "C"

?

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]