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]

C++/C Linkage problems


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.


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