Re: [Monetdb-developers] [Monetdb-checkins] clients/src/mapilib Mapi.mx, 1.6, 1.7
As I told Martin, both approaches have their disadvantages. However, you need to do *something*. Out of the box, if you use a --prefix other than /usr or /usr/local, the sample program won't run because it cannot find libMapi.so at run time.
So, if you have a better idea...
On 2007-03-01 15:53, Sjoerd Mullender wrote:
Update of /cvsroot/monetdb/clients/src/mapilib In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv16906/src/mapilib
Modified Files: Mapi.mx Log Message: propagated changes of Wednesday Feb 28 2007 - Thursday Mar 01 2007 from the Clients_1-16 branch to the development trunk
Index: Mapi.mx
RCS file: /cvsroot/monetdb/clients/src/mapilib/Mapi.mx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Mapi.mx 20 Feb 2007 10:48:07 -0000 1.6 +++ Mapi.mx 1 Mar 2007 14:52:59 -0000 1.7 @@ -141,6 +141,26 @@ @end verbatim @end example
+It assumes that the dynamic loadable libraries are in public places. +If, however, the system is installed in your private environment +then either one of the two following options can be used.
+@example +@verbatim +cc sample.c `monetdb-clients-config --cflags --libs` -lMapi -o sample \ +-Wl,rpath,`monetdb-clients-config --libdir` +./sample +@end verbatim +@end example
+@example +@verbatim +export LD_LIBRARY_PATH=`monetdb-clients-config --libdir` +cc sample.c `monetdb-clients-config --cflags --libs` -lMapi -o sample +./sample +@end verbatim +@end example
The compilation on Windows is slightly more complicated. It requires more attention towards the location of the include files and libraries.
Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=D... _______________________________________________ Monetdb-checkins mailing list Monetdb-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
On 01-03-2007 16:00:27 +0100, Sjoerd Mullender wrote:
As I told Martin, both approaches have their disadvantages. However, you need to do *something*. Out of the box, if you use a --prefix other than /usr or /usr/local, the sample program won't run because it cannot find libMapi.so at run time.
So, if you have a better idea...
That is irrelevant. A normal RPM install, installs into /usr prefix. On such system, you can do a normal compile, link and run.
http://www.quepublishing.com/articles/article.asp?p=30494&rl=1
Going into linker and runtime linker principles for such an easy example sounds like really wrong.
participants (2)
-
Fabian Groffen
-
Sjoerd Mullender