Hello,
after updating to Ubuntu 9.10 it was necessary to install the new Quantlib wiht version 0.9.9. With the older version 0.9.7 I got no problems after starting the binary. My example Makefile shows like this: g++ -DHAVE_CONFIG_H -I../cpp/QuantLib-0.9.9/ql -g -O2 -Wall -c -o gjrgarch.o gjrgarch.cpp g++ -g -O2 -Wall -o gjrgarch gjrgarch.o -L/usr/local/lib/ -lQuantLib The error message after typing ./gjrgarch is: ./gjrgarch: error while loading shared libraries: libQuantLib-0.9.9.so: cannot open shared object file: No such file or directory How I can fix this problem? Thanks in advance. pajofego |
Am 27.11.2009 18:06, schrieb pajofego:
> My example Makefile shows like this: > > g++ -DHAVE_CONFIG_H -I../cpp/QuantLib-0.9.9/ql -g -O2 -Wall -c -o > gjrgarch.o gjrgarch.cpp > g++ -g -O2 -Wall -o gjrgarch gjrgarch.o -L/usr/local/lib/ > -lQuantLib > > The error message after typing ./gjrgarch is: > > ./gjrgarch: error while loading shared libraries: libQuantLib-0.9.9.so: > cannot open shared object file: No such file or directory Please try a "ldd ./gjrgarch" to see where the linker expects to find libQuantLib-0.9.9.so Where did you install this library? Is there possibly more than one version of libQuantLib.so installed? Rgds, Andreas ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
In reply to this post by pajofego
libQuantLib.so is a link to libQuantLib-x.x.x.so
try: $ which libQuantLib.so you should get $ /usr/local/lib/libQuantLib.so then $ls -l /usr/local/lib/libQuantLib.so and see what it is pointing to, is this file in your search path?
|
In reply to this post by Andreas Spengler-2
Here the output of ldd ./gjrgarch: linux-gate.so.1 => (0x00293000) libQuantLib-0.9.9.so => not found libstdc++.so.6 => /home/pajofego/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib/libstdc++.so.6 (0x00bae000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x002cf000) libgcc_s.so.1 => /home/pajofego/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib/libgcc_s.so.1 (0x0040e000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000) /lib/ld-linux.so.2 (0x00621000) Before installing Quantlib 0.9.9 an older version were installed. So I've done a make uninstall of Quantlib 0.9.7. Here the output of ls -l /usr/local/lib/libQuantLib*.* -rw-r--r-- 1 root root 225587276 2009-07-05 21:59 /usr/local/lib/libQuantLib-0.9.7.a -rw-r--r-- 1 root root 254175150 2009-11-27 07:16 /usr/local/lib/libQuantLib-0.9.9.a -rwxr-xr-x 1 root root 115676159 2009-11-27 07:15 /usr/local/lib/libQuantLib-0.9.9.so lrwxrwxrwx 1 root root 19 2009-11-27 07:16 /usr/local/lib/libQuantLib.a -> libQuantLib-0.9.9.a -rwxr-xr-x 1 root root 1050 2009-11-27 07:15 /usr/local/lib/libQuantLib.la lrwxrwxrwx 1 root root 20 2009-11-27 07:15 /usr/local/lib/libQuantLib.so -> libQuantLib-0.9.9.so |
In reply to this post by henaffp
Hi here the output of your purpose: which libQuantLib.so: nothing -> how I can fix this ls -l /usr/local/lib/libQuantLib.so gives: /usr/local/lib/libQuantLib.so -> libQuantLib-0.9.9.so Could this give you further informations? Thanks in advance, pajofego |
In reply to this post by pajofego
pajofego <[hidden email]> writes: > Andreas Spengler-2 wrote: >> >> >> Please try a "ldd ./gjrgarch" to see where the linker expects to find >> libQuantLib-0.9.9.so >> >> Where did you install this library? Is there possibly more than one >> version of libQuantLib.so installed? >> >> > > Here the output of ldd ./gjrgarch: > > linux-gate.so.1 => (0x00293000) > libQuantLib-0.9.9.so => not found > libstdc++.so.6 => > /home/pajofego/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib/libstdc++.so.6 > (0x00bae000) > libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x002cf000) > libgcc_s.so.1 => > /home/pajofego/OpenFOAM/ThirdParty-1.6/gcc-4.3.3/platforms/linux/lib/libgcc_s.so.1 > (0x0040e000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00110000) > /lib/ld-linux.so.2 (0x00621000) > > > > Before installing Quantlib 0.9.9 an older version were installed. So I've > done a make uninstall of Quantlib 0.9.7. > > Here the output of ls -l /usr/local/lib/libQuantLib*.* > > > -rw-r--r-- 1 root root 225587276 2009-07-05 21:59 > /usr/local/lib/libQuantLib-0.9.7.a > -rw-r--r-- 1 root root 254175150 2009-11-27 07:16 > /usr/local/lib/libQuantLib-0.9.9.a > -rwxr-xr-x 1 root root 115676159 2009-11-27 07:15 > /usr/local/lib/libQuantLib-0.9.9.so > lrwxrwxrwx 1 root root 19 2009-11-27 07:16 > /usr/local/lib/libQuantLib.a -> libQuantLib-0.9.9.a > -rwxr-xr-x 1 root root 1050 2009-11-27 07:15 > /usr/local/lib/libQuantLib.la > lrwxrwxrwx 1 root root 20 2009-11-27 07:15 > /usr/local/lib/libQuantLib.so -> libQuantLib-0.9.9.so I'd try running as: LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./gjrgarch Best, Bojan -- Bojan Nikolic || http://www.bnikolic.co.uk ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ QuantLib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
Hi, with your method the program starts without error message. But what is the root cause of my problem? How can I fix it without using LD_LIBRARY_PATH. Thanks in advance. pajofego |
In reply to this post by pajofego
OK, so libQuantlibLib-0.9.9.so is in the right directory, but the linker didn't find it (see output of
your ldd). Did you run $ ldconfig after creating the new library? This is needed to update the cache used by ld. See man page for ldconfig for details. Hope this help.
|
Perfect! Now it works! Many thanks to all for the great support.
Best regards pajofego
|
Free forum by Nabble | Edit this page |