Archived

This topic is now archived and is closed to further replies.

Toolmaker

Command line compiling with DJGPP gives me errors on new...

Recommended Posts

I am using DJGPP to compile an executable which runs under DOS. I got both of my files collected in a directory and I can compile them successfully. I used:
gcc -c -Wall rac.cc
 
And for linking I use
gcc -o parse.exe rac.o
 
However, when I try to link the application, I get this output:
rac.o(.text+0x570):rac.cc: undefined reference to `operator new(unsigned long)''
rac.o(.text+0x5c6):rac.cc: undefined reference to `operator new[](unsigned long)
''
rac.o(.text+0x781):rac.cc: undefined reference to `operator delete[](void*)''
rac.o(.text+0x7c0):rac.cc: undefined reference to `operator delete[](void*)''
rac.o(.text+0x95e):rac.cc: undefined reference to `operator delete[](void*)''
rac.o(.eh_frame+0x11):rac.cc: undefined reference to `___gxx_personality_v0''
collect2: ld returned 1 exit status
 
What am I doing wrong here? Toolmaker
My site /* -Earth is 98% full. Please delete anybody you can.*/

Share this post


Link to post
Share on other sites
You might need to include the standard library on the linker settings. For other gcc versions you''d use the -lstdc++ linker option. I don''t know if it''s called the same thing under DOS however.

Share this post


Link to post
Share on other sites