Agh! Use std::cout, std::endl etc or a “using namespace std”.
Namespaces are nice. (Not the cause of your problem though)
cc -shared -Wl,-soname,Test.so -L/usr/local/lib -o Test.so test.o -L. -lruby -lc
Doesn’t look like you are linking in the C++ standard library
explicitly.
To my knowledge, cc doesn’t do that implicitly. I think the switch is
-lstdc++ but I am not sure as I usually use the CXX (such as g++)
instead of CC for the linking, and I think that g++ links to the C++
library implicitly.
···
–
([ Kent Dahl ]/)_ ~[ http://www.stud.ntnu.no/~kentda/ ]/~
))_student/(( _d L b_/ NTNU - graduate engineering - 5. year )
( __õ|õ// ) )Industrial economics and technological management(
_/ö____/ (_engineering.discipline=Computer::Technology)
cc -shared -Wl,-soname,Test.so -L/usr/local/lib -o Test.so test.o -L. -lruby -lc
Doesn’t look like you are linking in the C++ standard library
explicitly.
To my knowledge, cc doesn’t do that implicitly. I think the switch is
-lstdc++ but I am not sure as I usually use the CXX (such as g++)
instead of CC for the linking, and I think that g++ links to the C++
library implicitly.