From: huiliang wu Date: 2006-06-16T17:27:34+09:00 Subject: In an ruby c extension, How to link it with a shared library written in c++ ------=_Part_17297_3408049.1150446451949 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I have a simple shared library written in c++ and named libfoo.so, the header files is: #ifndef FOO_H #define FOO_H #ifdef __cplusplus extern "C" { #endif void say(const char *pSentence); #ifdef __cplusplus } #endif #endif When I use `nm libfoo.so | grep say`, I can get such result: 00000916 t _GLOBAL__I_say 00000858 T say But when I use have_library("foo", "say") in extconfig.rb, it fails. Previously I compile libfoo.so in c, and it can find this library. I don't why this happens, could you help me? Thanks in advance! ------=_Part_17297_3408049.1150446451949--