User forums > Help

g++ no input file

<< < (2/4) > >>

Pecan:
Did you know:
Compiling: Settings -> Compiler and Debugger -> Tab "Other" -> Compiler logging = "Full command line".

MortenMacFly:

--- Quote from: Pecan on January 22, 2008, 04:03:41 pm ---Did you know:
Compiling: Settings -> Compiler and Debugger -> Tab "Other" -> Compiler logging = "Full command line".

--- End quote ---
Hey! Sig piracy detected! ;-) :lol: :lol: :lol:

Varz:
Okay

-------------- Build: Release in consoletest ---------------

g++ -Wall -fexceptions  main.cpp     -c /home/mark/Documents/CB/consoletest/main.cpp -o obj/Release/main.o
g++: cannot specify -o with -c or -S with multiple files
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 



[attachment deleted by admin]

MortenMacFly:

--- Quote from: Varz on January 23, 2008, 02:32:09 am ---g++ -Wall -fexceptions  main.cpp     -c /home/mark/Documents/CB/consoletest/main.cpp -o obj/Release/main.o
g++: cannot specify -o with -c or -S with multiple files

--- End quote ---
You see: Being able to see the project makes it clear:
Please remove "main.cpp" as compiler option :shock:. The file arguments are managed by C::B! That's why it's an IDE.... ;-)

thomas:

--- Quote ---g++: no input files
--- End quote ---

--- Quote ---g++: cannot specify -o with -c or -S with multiple files
--- End quote ---
Ok, first of all, these are two entirely different error messages.
Regarding the last message (with full commandline provided), the message explains what is wrong, and the commandline shows that main.cpp appears twice. Since -o is given to specify the output file (Code::Blocks always does that), this is ambiguous. The compiler refuses to write two (different) files to the same output file.


--- Quote ---Even after making a new console project in the project wizard and trying to compile it
--- End quote ---
I'm sorry, but you cannot be telling the truth. I looked at the wizard to rule out a bug in the wizard, and I created a console project which certainly compiles fine without any problems.
I am using rev 4836, which is identical to 4830 in respect of the involved components.

You added main.cpp as a compiler option after creating the console project, either via the "Build Options" menu, or by editing the project file by hand.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version