automake
[Top][All Lists]
Advanced

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

Libtool, SWIG and testing


From: Guillaume Marcais
Subject: Libtool, SWIG and testing
Date: Fri, 24 Jul 2015 15:13:49 -0400

Hello all,

I am improving/writing a C++ project (called MUMmer) which creates a shared
library with libtool. In the same project, I also create a SWIG binding to
access in Perl some of the functionality of this shared library.

Libtool creates the shared library in a hidden directory:

.libs/libumdmummer.so

The SWIG compilation creates a couple a files, a perl module file and a
shared library:

swig/perl5/mummer.pm
swig/perl5/.libs/mummer.so

The problem comes in when when I write tests in Perl. I need to add
directories to the Perl lib path so that it finds the module and shared
library, like this:

perl -I ./swig/perl5 -I ./swig/perl5/.libs test.pl

Passing the path './swig/perl5/.libs' seems very hackish and not portable.
This path was not specified anywhere, libtools decided to hide files there
on its own, and it feels like I should not use these files directly.

What is the proper way for testing programs to find (and use, via dlopen)
not yet installed shared libraries compiled by automake/libtool?

Thanks,
Guillaume.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]