weird problem with c++ libraries and symbols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I am facing a weird problem with a c++ library and after having googled
for a while I'm asking here for a suggestion.

In the last months, I developed an application in C. This application
consists of several libraries and programs. Everything is written in C
with the exception of the library handling RTSP streaming, which uses
livemedia ( http://www.live555.com/liveMedia/ ) to do all the protocol
stuff, which is written in C++, but the RTSP library I wrote was meant
to be used only by C programs.

LiveMedia provides some makefiles that compile the 4 provided libraries
as static libraries, and I statically linked these .a files into my
final .so and everything worked.

Now I have to expand my application and I need to use the libraries
provided by livemedia also in another program, so I decided to try and
write my own makefile by using autotools to get four .so libraries that
I can reuse them in different applications.

I build the for libraries of livemedia and my own library which depends
on the previous four and I expect that by linking all the libraries to
the binary everything should work, but it does not.

The problem that I'm facing is that some symbols from the livemedia
libraries are undefined, I tried to solve it in different ways but I ran
out of ideas.

Here are my thoughts:

* can it be the fact that I'm mixing C and C++? It seems that the
unresolved symbols are due to virtual and static functions and not to
name mangling

* I tried to add all the files of the livemedia library to the sources
of my dynamic library, so that I could have one big library instead of
5, but the problem persists.

* I complied again manually the static libraries and added them to my
dynamic library. It works, but I don't understand why and I cannot
understand why the previous case does not. Is it a problem due to autotools?

* I tried to use -fvisibility with different values, with no luck.

I'm not expert of C++, so surely I made a mistake, but I haven't been
able to understand where it is. Did you ever face a similar problem? Or
do you have a hint for me? I wrong this long email trying to clearly
explain my problem.

Thank you for any answer in advance,

Ottavio


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux