Results 1 to 2 of 2
I built a shared library for some API functions (C files) and compiled them with gcc. Now I'm writing a c++ application (compiling with g++) and want to link my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-02-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 2
gcc shared library for g++ application
I built a shared library for some API functions (C files) and compiled them with gcc. Now I'm writing a c++ application (compiling with g++) and want to link my C API shared library and be able to use it from my application. Is this possible? At first instance, it's not quite working for me. I was able to link my shared lib just fine with a C application but got an "undefined reference to `apiFunction()'" error when attempting to do it with g++. Just want to see if anyone has any insight on this subject and make sure this mix is even is allowed.
- 05-02-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,232
Basically, something in either your c++ application, or in the shared library, is trying to call apiFunction(), but it isn't there. This is not a gcc/g++ problem, but an application development error.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
