I've been struggling to find a good systematic way to link with multiple libraries that depend on each other. I have libfirst, libsecond, and libthird. There are functions in libfirst that are needed by libthird and there are functions in all 3 that are needed by my inline code. I can build them as static libraries or shard libraries, though I would prefer to use the static form.

If I just specify LIBS => '-L /path/to/libs/ -lfirst -lsecond -lthird', then the inline code doesn't seem to find them. I've tried adding MYEXTLIB => '/path/to/libs/first.a' etc... but it isn't clear how to add all of the libraries in this manner. So far, the best approach I have working is to yank all of the .o files back out of the libraries and build them into a single shared object file. That isn't ideal.

The libraries are versioned with my development, staging, and live versions so I am not in a position to install them in a standard systemwide location.

What is the right way to handle this?

Thanks,

Joel Peshkin



Reply via email to