emacs-orgmode
[Top][All Lists]
Advanced

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

[O] [babel] dynamic linking in user directory not working for C++ langua


From: Benoit Bayol
Subject: [O] [babel] dynamic linking in user directory not working for C++ language
Date: Tue, 28 Jan 2014 15:00:17 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Hello everyone :)

I have a problem that I cannot fix when compiling a C++ source block.

My code block use several libraries and especially one named libarmadillo.dylib which is installed in a non-default place.

My code compiles well in the buffer shell of emacs with :
g++ -I/Users/benoitbayol/libs/include /Users/benoitbayol/libs/lib/libboost_system.a /Users/benoitbayol/libs/lib/libboost_chrono.a /Users/benoitbayol/libs/lib/libboost_thread.a -L/Users/benoitbayol/libs/lib -larmadillo main.cpp

but if I copy paste these flags and put them in :
#+begin_src C++ flags : -I/Users/benoitbayol/libs/include /Users/benoitbayol/libs/lib/libboost_system.a /Users/benoitbayol/libs/lib/libboost_chrono.a /Users/benoitbayol/libs/lib/libboost_thread.a -L/Users/benoitbayol/libs/lib -larmadillo

The compilation process with babel complains about a dylib (libarmadillo.3.dylib) which cannot be found with :
dyld: Library not loaded: libarmadillo.3.dylib
Referenced from: /var/folders/xh/vvf5bjg15c3_rn5kdb4d2lk40000gn/T/babel-329218a6/C-bin-32921x5m
  Reason: image not found

In the /Users/benoitbayol/libs/lib folder I have
-rwxr-xr-x 1 benoitbayol staff 41592 28 jan 14:03 libarmadillo.3.92.2.dylib lrwxr-xr-x 1 benoitbayol staff 25 28 jan 14:03 libarmadillo.3.dylib -> libarmadillo.3.92.2.dylib lrwxr-xr-x 1 benoitbayol staff 20 28 jan 14:03 libarmadillo.dylib -> libarmadillo.3.dylib

I tried to fix my .emacs with (setq org-babel-C++-compiler "g++ -L/Users/benoitbayol/libs/lib") but I doesn't work.

Does anybody have an idea ?

Thanks :)

--
BenoƮt BAYOL
address@hidden
0033 6 3353 1153




reply via email to

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