Using static d libs in C++

Chrono chrono at mta-international.net
Sat Sep 29 03:14:11 PDT 2007


Hi Mike,

thank you for your help.

now I tried:

gcc main.o sub.o -o myprogram -m32 -lstdc++ -Xlinker -L/root/dmd/lib 
-lphobos -lpthread -lm

/root/dmd that's the original dmd linux package.

but same error as before:

/root/dmd/lib/libphobos.a(deh2.o): In function 
`_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable':
internal/deh2.d:(.gnu.linkonce.t_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x9): 
undefined reference to `_deh_beg'
internal/deh2.d:(.gnu.linkonce.t_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0xe): 
undefined reference to `_deh_beg'
internal/deh2.d:(.gnu.linkonce.t_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x14): 
undefined reference to `_deh_end'
internal/deh2.d:(.gnu.linkonce.t_D4deh213__eh_finddataFPvZPS4deh213DHandlerTable+0x37): 
undefined reference to `_deh_end'
collect2: ld returned 1 exit status


More information about the Digitalmars-d-learn mailing list