Code: Select all
.//liblib.a(lib.o):lib.cpp:(.text+0x1e): undefined reference to `std::cout'
.//liblib.a(lib.o):lib.cpp:(.text+0x23): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
.//liblib.a(lib.o):lib.cpp:(.text+0x2b): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
I tried to copy the stdc++.a, but I got more errors.
I know that FreeBasic can link libraries in the same way as GCC: on C forums, I found no help (the only suggestion was to use G++ instead of GCC, to link all files, or to use a makefile, but this is not a good solution, since I need to use fbc)
Can anybody help me? How can I link a library compiled with C++? Can I "pre-link" it and the C++ run-time, to have a single .a file? If so, how?