You shouldn't link to libstdc++*.a directly. One way
to get around C++ linkage errors when invoking gcc is
to reimplement a few choice functions:
http://ampaste.net/f424be4c2
You can probably just cram this into any .cpp file in
Metamod to get better compatibility against later GCC
versions.
Regards,
--
David Anderson
http://www.bailopan.net/
--- Florian Zschocke <zschocke@...> wrote:
>
> > LoadLibrary failed on ./cstrike/dlls/mymodule.so:
> Undefined symbol:
> > "__gxx_personality_v0"
>
> Yes, uhm, this might be since newer gcc/glibc
> combinations. I'm not sure
> but I think this wasn't a problem with older
> versions. So you might have
> to link with g++.
>
> > And one other thing I recognized: MetaMod does not
> have the dependency
> > "libgcc_s.so.1". Which library is that? Is this
> the C-Standard Library?
>
> No, the Standard C library, glibc, is /lib/libc.so.6
> See http://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
> for libgcc.
>
> > And how can I link the libstdc++.a statically (I
> mean the link
> > parameters for linking).
>
> Just link it in explicitly. This is from the Admin
> Mod link line (only
> part of it):
>
> g++ -Wall -o admin_MM_i386.so objMM/dll.o
> objMM/AmFSNode.o
> objMM/amlibc.o objMM/amxconvert_l.o
> /usr/lib/libstdc++-libc6.2-2.a.3
> -ldl -lcrypt -lm -L../../commonlib -lamcommon
> -shared -nodefaultlibs
> -lc -lgcc
>
> This is a bit hacky, though. Agreed. But it worked
> for us. The
> distributed Makefile would link against
> libstdc++.so, of course. Only
> the locally linked and then distributed binary is
> linked statically
> against stdc++.
>
> Regards,
> Florian
>