Problems with C++/DJGPP
Hi all.
I''ve been programming BASIC for a long time, but about a few weeks ago I started learning C. I''m catching on pretty fast, but recently after reading some articles I discovered I would be better learning C++, so I made the switch.
Problem is though, the compiler I''m using (DJGPP) gives me the following error message when building C++ programs, although it didn''t when building C programs.
Error: c:/djgpp/bin/ld.exe: cannot open -lstdcx: No such file or directory (ENOENT)
If anyone can help me out with this I would be very grateful.
DJGPP used to be my Compiler of Choice, until I changed to VC++. I think it might be your PATH, set in you autoexec.bat file. Or you didnt install DJGPP for C++, when you downloaded it, make sure you got the right zip''s for C++. Also, you might want to go straight to VC++, your choice
Yes, the path and missing files were the first things I thought of. But after checking, I discovered I did have all nessesary files and the path settings the Autoexec.bat were correct.
I''ve never used that compiler before but perhaps this might help. Are you sure that you are compiling for C++ and not just C. In most compilers you have to tell it which of them to the generate code for. Might be a comand line switch.
As well, you might have to make sure that the extention is .cpp and not just .c.
NOTE: This advice might be totally wrong, as I have mentioned above that I have no knowledge of that compiler. This is just an informative what/if response to try and offer some sort of solution.
As well, you might have to make sure that the extention is .cpp and not just .c.
NOTE: This advice might be totally wrong, as I have mentioned above that I have no knowledge of that compiler. This is just an informative what/if response to try and offer some sort of solution.
hmmmmm... I use RHIDE, DJGPP's IDE - I think maybe I do have to tell it which language I'm compiling - the only difference between compiling c and c++ in my programs has been the .cpp extenstion. If you do need to tell it, I can't seem to work out how.
Edited by - Bob on 1/17/00 10:30:34 PM
Edited by - Bob on 1/17/00 10:30:34 PM
You should not have to tell it if it is C or C++, as you thought it tells by the extention, but Ive always invoked the compiler from command line, for example:
gcc test1.cpp -o test1.exe -lm
try that and see if it works
gcc test1.cpp -o test1.exe -lm
try that and see if it works
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement