This is what happens when I try to compile this program under cygwin on my Windows XP machine:

% gcc newtest.cpp
/tmp/ccReoXoA.o:newtest.cpp:(.text+0x32): undefined reference to `operator new(unsigned int)' /tmp/ccReoXoA.o:newtest.cpp:(.text+0x5e): undefined reference to `operator delete(void*)'
collect2: ld returned 1 exit status


gcc is compiling the C++ source fine, but it does not automatically figure out that it needs to link in the c++ runtime. You have to call it as "g++" instead. It works that way on Linux too.

-Lewis


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to