I am trying to learn about the cmu-lisp foreign language interface on
cmu-lisp. I have looked at the manaul and my machine (redhat 8.0) runs
the "step-by-step alien example" just fine. I would like to have access
to some other C libraries (Intel's OpenCV library) but I am getting
errors in linking to it. It appears that the cmu-lisp can't "open" the
library. The output I get is the following:
*******************
* (load-Foreign "/home/blake/aprograms/lush/hexagon_func.o" :libraries
'("-lopencv" "-lhighgui"))
;;; Running /usr/bin/ld...
Error in function SYSTEM::LOAD-OBJECT-FILE:
Can't open object "/tmp/3342AG1495":
"/usr/local/lib/libhighgui-0.9.so.5: undefined symbol: __gxx_personality_v0"
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(SYSTEM::LOAD-OBJECT-FILE "/tmp/3342AG1495")
Source: Error finding source:
Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer
exists:
target:code/foreign.lisp.
0]
**************
I don't have any problem compiling and linking the program in Lush, nor
when I use it in C. I do *not* get the problem when I link with
'("-lc"), but I do seem to get the problem with other libraries. What
could be the problem?
Thanks
Blake
>>>>> "bl" == blake <········@earthlink.net> writes:
bl> Error in function SYSTEM::LOAD-OBJECT-FILE:
bl> Can't open object "/tmp/3342AG1495":
bl> "/usr/local/lib/libhighgui-0.9.so.5: undefined symbol:
bl> __gxx_personality_v0"
this symbol is related to the C++ support in GCC; probably the highgui
library is implemented in C++. You should add the C++ runtime to the
list of dependent libraries ("-lstdc++").
--
Eric Marsden <URL:http://www.laas.fr/~emarsden/>
You were right; I did need the C++ support. However, I tried using the
"-lstdc++", and it still complained of not finding the files. I then
loaded the foreign files directly , a la
(load-Foreign "/usr/lib/libstdc++.so.5" )
(load-foreign "/usr/local/lib/libopencv.so")
(load-foreign "/usr/local/lib/libhighgui.so")
and this seems to work fine. Thanks for your help.
Blake
Eric Marsden wrote:
>>>>>>"bl" == blake <········@earthlink.net> writes:
>
>
> bl> Error in function SYSTEM::LOAD-OBJECT-FILE:
> bl> Can't open object "/tmp/3342AG1495":
> bl> "/usr/local/lib/libhighgui-0.9.so.5: undefined symbol:
> bl> __gxx_personality_v0"
>
> this symbol is related to the C++ support in GCC; probably the highgui
> library is implemented in C++. You should add the C++ runtime to the
> list of dependent libraries ("-lstdc++").
>