Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using .a libraries in c++ 1

Status
Not open for further replies.

scienzia

Programmer
Feb 21, 2002
160
0
0
IT
Hi,

I made some C applications that use a statically linked library I made in C (libMy_lib.a).

Now I would like to know if it is possible to use that library in a C++ application.

I used a Makefile equal to the one I used in my C applications, by I got an error:

/tmp/ccGnH5yD.o(.text+0x46): In function `main':
: undefined reference to `log_send(unsigned char, char const*)'

log_send is implemented in my library.

Thanks in advance
 
Common rule: don't forget to add extern "C" linkage specification in C functions prototypes for C++ code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top