use C library and source code with in c++ in eclipse

I have a c library which by compiling it.It will produce a .so library which will be use in other c project with one of the header file(x.h) which is used to access the library function in .so file in your project. very simple in my project Include x.header and give -lx.so file and path to the library source directory(of .so file) to eclipse c linker and compile my project.

Question is that How can I use this c library with my c++ project as in c project explained above?

I did the same in my c++ code in eclipse and add .so file in my c++ linker library also Include library source path to it. thereafter I add header and tried to use the library function but eclipse give error "undefined reference to functions ..." and can not compile the code.


Thank you.
Last edited on
Topic archived. No new replies allowed.