Subj : Re: C++ and C libraries To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Tue Apr 27 2004 09:15 am This derives from the way C++ handles public names. C++ supports function overloading, more than one function with the same name but each has a different argument list. To implement that the public names of C++ functions have characters indicating the argument list types added to the end of their name. The names are said to be 'mangled'. C forms the public names by inserting a leading underscore in the name. In C int Doit(int) public name is _Doit int Doit(char*, int) public name is _Doit In C++ int Doit(int) public name is @Doit$qi int Doit(char*, int) public name is @Doit$qpci The C++ language specifies a way to indicate that a public name be formed in the manner used by C. In C++ extern "C" Doit(int) public name is _Doit extern "C" int Doit(char*, int) public name is _Doit A curly braced block can be used to make the extern "C" apply to a group of items. If you take the header files used for that library and modify them in this manner I think the problem will dissapear. ----start of header file------- #ifdef __cplusplus extern "C" { #endif ----current contents of the header file--- #ifdef __cplusplus } #endif ----end of header file------- If you look in the compiler supplied header files such as stdio.h you can see this technique in use. .. Ed > Luigi Fonti wrote in message > news:408e0cef$1@newsgroups.borland.com... > > I have an application developed for MSDOS using Borland > C++ 4.0 Now, to add network functionalities to it, I should > link a TCPIP library written just for Borland environments > (wattcp). I got libraries (for different memmory models) and > sources, too. Unhappily if I insert in my sources some calls > to TCPIP functions, the libraries are not linked, and the > called fuctions remains unresolved. > ... > The problem seens to be in source types: the application > sources are .cpp, while the TCPIP library sources are .c > ... .