gcc problem
when i wrote a prog in c++ and try to compile it i get pages of eroors it is carrect and there is no error because when there is error it reports it but when it becames correct and try to compile it i get
undefined reference to everything i couldnt get the errors with gcc example.cpp -o example >error.txt so i coulndt post it any idea why? |
if you did it in an xterm, you could cut n paste
the errors. it looks like like you are just creating an executable error.txt, but thats just a guess. |
That is because you are compiling a C++ program with a C compiler :)
Try using g++ instead. |
And make sure you don't need to add -lsomething when you link the program (for example '-lm' when you're using mathematical functions).
|
aghhhh s*it thanks guy never checked it yeah i was using gcc sorry my stupidty
|
Quote:
|
All times are GMT -5. The time now is 12:49 AM. |