|
cannot specify -o with -c or -S and multiple compilations? |
Gnatinator
Member #2,330
May 2002
|
ERROR: cannot specify -o with -c or -S and multiple compilations Could anyone please tell me what that linking error means??
|
spellcaster
Member #1,493
September 2001
|
What was your commandline? -- |
mEmO
Member #1,124
March 2001
|
Very difficult to say without more info. Are you using Dev-C++ or command line? If it's command line it might be an error in you setup g++ -c myfile.cpp -o myfile.o -s g++ myfile.o -lalleg -o myexe.exe -s That should do the trick (assuming you only use allegro, that is). If it's Dev-Cpp I don't know exactly what cause it. It might be an error in your setup; I don't know. --------------------------------------------- |
spellcaster
Member #1,493
September 2001
|
My guess would be that you're commandline arguements would imply linking, but you've specified either -c or -S so it's not allowed to link. -- |
23yrold3yrold
Member #1,134
March 2001
|
Your files have spaces in their names. -- |
spellcaster
Member #1,493
September 2001
|
Quote: We will now stone you. "Are there any women here today?" Ehh, all right. Two points, ah, two flats, and a packet of gravel.
-- |
Gnatinator
Member #2,330
May 2002
|
No spaces, +, - etc in my files... I am using Dev-c++ 5, but this also happens with the same code in Djgpp w/ RHIDE. ERRORS: 2. ../hello/main.o: No such file or directory I know there are not any object files. Dosent Dev-c++ generate them for you? The error also states that the file that it is getting the error in also is named: G_~1.EXE My program is only one file and it is: main.cpp Me wonders if I need to reinstall...:(
|
spellcaster
Member #1,493
September 2001
|
Just doens't give us any useful information. Avoid giving us the commandline supplied for the compiler at all costs. Try to give us some hints which lead in different directions. You could try to mention VC and linux for example. Or that you don't understand why it does generate a core file instead of an .exe or something. On the other hand, maybe you don't want a solution? And you just use this thread to chat about the problem? Like to release steam? Now then it's ok. Quote: Me wonders if I need to reinstall...:( Re-install what? Windows? On the Linux partition of your iMac? Maybe you should simply try to generate a new project in Dev-cpp and try again. On the other hand reinstalling might be more fun. It also sounds better. Make sure you print the docs to dev-cpp / the FAQ, etc. before you reinstall, so you have something to read during the installation process. -- |
Evert
Member #794
November 2000
|
What version of MinGW are you using (note: MinGW, the compiler, not Dev-C++, the IDE)? |
Thomas Fjellstrom
Member #476
June 2000
|
Is DevC++ installed in C:\Program Files? If so, then there IS a space in your filenames [edit] w0w. Im full of nothing today. -- |
Gnatinator
Member #2,330
May 2002
|
Ooops sorry bout that spellcaster. Heres the compile log: Compiler: Default compiler G__~1.EXE: cannot specify -o with -c or -S and multiple compilations g++.exe ../hello/main.o -o "hello.exe" -L"C:/DEVCPP/lib" -I"C:/DEVCPP/include" -I"C:/DEVCPP/include/c++" -I"C:/DEVCPP/include" C:\DevCpp\lib\liballeg.a G__~1.EXE: ../hello/main.o: No such file or directory Execution terminated EDIT And I am using Mingw/GCC 3.2
|
spellcaster
Member #1,493
September 2001
|
You're specifying the allegro library in the compile call. Make sure you put it in the lib section of the settings. I don't know dev-cpp but I guess you should be able to find a link tab with a libs text entry field. Oh: see how posting the cmd line helps? -- |
Gnatinator
Member #2,330
May 2002
|
Haha, cool now it works. I was specifying the allegro library in the compile call.
|
spellcaster
Member #1,493
September 2001
|
Glad I could help. I'm also glad you didn't take my small rant above personally -- |
|