> Add have_library("stdc++") to extconf.rb. I don't use any build system for this little wrapper, or do you mean I should add this to the ruby source and recompile ruby? I guess no :) > How doesn't it work properly? I'll try to explain: I have two Files: - The first one is a cpp file that wraps the functionality I want into a function. I compile this one with g++ to an object file - The second file is a .c file (my ruby extension). I compile this with gcc because g++ gives errors like: bash-2.05b$ g++ -c cRubyTest.c cRubyTest.c: In function `void Init_cRubyTest()': cRubyTest.c:56: error: invalid conversion from `VALUE (*)(long unsigned int)' to `VALUE (*)(...)' I got the code from the pickaxe book and don't know with this doesn't work with g++. gcc compiles correctly to an object file. - But if I try to link (with g++ cRubyTest.o cr.o -lcryptopp) ld sais: cRubyTest.o(.text+0x1b): In function `cfunc': : undefined reference to `GenerateRSAKey' collect2: ld returned 1 exit status where GenerateRSAKey is the wrapper function from the cpp file..... I tried also linking with g++ cruse.o cr.o -lcryptopp -lstdc++ because you said I should include the libstdc++ I'm stuck. If I strip away anything from cRubyTest.c that has to do with ruby, it compiles with g++ and links properly, but doesn't do anything useful of course :(( It should be possible to take a object made with gcc and one made with g++ and link them together properly, shouldn't it? Please help me! Dominik