C++/C Linkage problems

손석배 sb.son@partner.samsung.com
Mon Jul 22 23:25:00 GMT 2002


I made a library written in C++.
Instead of offering library classes, the library offers C type library functions to the outside.
(This library is compiled by g++)

Now, I write a program written in C and this program use functions from the library that I mentioned above.

I wanted to compile and link this C code with gcc(c complier), not g++(c++ compiler).
Is it possible? If so, what option should I use?
If it's not possible, what is the solution for this case?

Restrication : 
1. Library should be written in C++ 
2. The code which use library should be written and complied by c complier
3. I want to use gcc to link this c code.

* P.S. I don't know if "Restrication 3" is the strict one. But 1, 2 should be kept strictly.



More information about the Gcc-help mailing list