[Mono-list] C/C++ issue
    Robert Jordan 
    robertj at gmx.net
       
    Fri Nov 23 10:44:08 EST 2007
    
    
  
Hi,
thor71 at gmail.com wrote:
> Unhandled Exception: System.DllNotFoundException: libhello_cpp
>   at (wrapper managed-to-native) HelloSample:print_hello_world_cpp ()
>   at HelloSample.Main () [0x00000]
> knorrhane mono_test/mono_test4 $
> <-- snip -->
> 
> I'm running Fedora 7, gcc 4.1.2 and Mono 1.2.3.
> 
> Any idea what my problem is?
First, you have to link with -fPIC switch:
     gcc -fPIC --shared -o libhello_cpp.so hello_cpp.cpp
     gcc -fPIC --shared -o libhello_c.so hello_c.c
Second, what's the output of "ldd libhello_cpp.so"?
Robert
    
    
More information about the Mono-list
mailing list