www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - set_unexpected() is undefined in C++ RTL

↑ ↓ ← Scott Michel <scottm cs.ucla.edu> writes:
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
Jan 22 2004
↑ ↓ → Dimitri Kaparis <dkaparis universalstudyhelper.com> writes:
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
Jan 23 2004