Thread: Kill me too

  1. #1
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227

    Kill me too

    Can anyone figure out what this means and why it wont compile?


    Compiler: Default compiler
    Building Makefile: "C:\Dev-Cpp\My C++ Work\Makefile.win"
    Executing make...
    make.exe -f "C:\Dev-Cpp\My C++ Work\Makefile.win" all
    g++.exe -c Untitled4.cpp -o Untitled4.o -I"C:/Dev-Cpp/include/c++/3.3.1" -I"C:/Dev-Cpp/include/c++/3.3.1/mingw32" -I"C:/Dev-Cpp/include/c++/3.3.1/backward" -I"C:/Dev-Cpp/lib/gcc-lib/mingw32/3.3.1/include" -I"C:/Dev-Cpp/include" ../include/conio.c -nostdlib

    g++.exe: cannot specify -o with -c or -S and multiple compilations

    make.exe: *** [Untitled4.o] Error 1

    Execution terminated
    Keyboard Not Found! Press any key to continue. . .

  2. #2
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    g++.exe: cannot specify -o with -c or -S and multiple compilations

    It means that you are calling g++ with the -o, -c, or -S option when you are trying to do multiple compilations.

  3. #3
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by man gcc
    -o file
    Place output in file file. This applies regardless to whatever
    sort of output is being produced, whether it be an executable file,
    an object file, an assembler file or preprocessed C code.

    Since only one output file can be specified, it does not make sense
    to use -o when compiling more than one input file, unless you are
    producing an executable file as output.
    you cant compile 2 source files (as you are doing above) into an object file. You need to compile them individually (using -c) into .o files then link them into an executable OR compile them into an executable nameing it with -o name (and excluding -c)

  4. #4
    Arggggh DeepFyre's Avatar
    Join Date
    Sep 2004
    Posts
    227
    does it matter what order the things are compiled in?
    Keyboard Not Found! Press any key to continue. . .

  5. #5
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> does it matter what order the things are compiled in?
    Nope.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to kill a dragon with various programming languages
    By g4j31a5 in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 10-01-2007, 12:13 PM
  2. Kill Signal Number? - Help !
    By brett in forum C Programming
    Replies: 5
    Last Post: 06-20-2007, 03:39 AM
  3. need code to kill running application
    By Jinxed in forum Windows Programming
    Replies: 1
    Last Post: 01-31-2002, 09:06 PM