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

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

This topic is 4957 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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) undefined reference to `operator new(unsigned long)''
rac.o(.text+0x5c6) undefined reference to `operator new[](unsigned long)
rac.o(.text+0x781) undefined reference to `operator delete[](void*)''
rac.o(.text+0x7c0) undefined reference to `operator delete[](void*)''
rac.o(.text+0x95e) undefined reference to `operator delete[](void*)''
rac.o(.eh_frame+0x11) 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