January 23, 2004 set_unexpected() is undefined in C++ RTL | ||||
---|---|---|---|---|
| ||||
Walter: Compiling the following snippet with and without STLport fails with set_unexpected undefined at link time: #include <exception> int main(void) { set_unexpected(NULL); return 0; } -scooter |
January 23, 2004 Re: set_unexpected() is undefined in C++ RTL | ||||
---|---|---|---|---|
| ||||
Posted in reply to Scott Michel | Scott Michel wrote: > Walter: > > Compiling the following snippet with and without STLport fails with > set_unexpected undefined at link time: > > > #include <exception> > > int main(void) > { > set_unexpected(NULL); > return 0; > } > > > -scooter set_unexpected is defined in namespace std. Once that is fixed, the above code builds successfully using the static RTL (assuming default configuration, with STLPort installed). With the DLL runtime library, linking fails with undefined symbol error: sc test.cpp -Ae -mn -o+time -WA -ND -3 -a8 -c -D_CONSOLE=1 -otest.obj link /NOI /DE /E /PACKF /XN /NT /ENTRY:mainCRTStartup /BAS:4194304 /A:512 @Test.LNK Error: C:\documents and settings\dimitri\my documents\my projects\Test\test.OBJ(test) : Symbol Undefined ?set_unexpected@std@@YAP6AXXZP6AXXZ@Z (void cdecl (*)(void )cdecl std::set_unexpected(void cdecl (*)(void ))) Lines Processed: 828 Errors: 1 Warnings: 0 Build failed sc test.cpp -Ae -mn -o+time -WA -3 -a8 -c -D_CONSOLE=1 -otest.obj link /NOI /DE /E /PACKF /XN /NT /ENTRY:mainCRTStartup /BAS:4194304 /A:512 @Test.LNK ren .\$SCW$.EXE Test.EXE .\Test.EXE built Lines Processed: 828 Errors: 0 Warnings: 0 Successful build |
Copyright © 1999-2021 by the D Language Foundation