From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benoit Bayol Subject: [babel] dynamic linking in user directory not working for C++ language Date: Tue, 28 Jan 2014 15:00:17 +0100 Message-ID: <52E7B7F1.8080107@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W89KW-0008HM-EY for emacs-orgmode@gnu.org; Tue, 28 Jan 2014 09:08:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W89KN-0007hx-Ms for emacs-orgmode@gnu.org; Tue, 28 Jan 2014 09:07:56 -0500 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:51124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W89DC-0005LC-4g for emacs-orgmode@gnu.org; Tue, 28 Jan 2014 09:00:22 -0500 Received: by mail-lb0-f169.google.com with SMTP id q8so360922lbi.14 for ; Tue, 28 Jan 2014 06:00:19 -0800 (PST) Received: from mas-dhcp-245.mas.ecp.fr (mas-dhcp-245.mas.ecp.fr. [138.195.79.245]) by mx.google.com with ESMTPSA id qx1sm16726289lbb.15.2014.01.28.06.00.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 28 Jan 2014 06:00:18 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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 benoit.bayol@gmail.com 0033 6 3353 1153