#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0

    compiler error problem


    with my IDE (quincy 99), i try compiling even a simple script, but it always comes up with this error msg:

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

    what does that mean, and how can I fix it?
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,216
    Rep Power
    2222
    The -c option compiles the source file and stops -- ie, it does not link the resultant object file into an executable.

    The -S option produces an assembly code output and stops -- ie, it does not create an object file nor does it create an executable.

    In both these cases, the resultant .o or .s file would by default have the same name as the source file -- eg, gcc -c foo.c would produce a foo.o file. The -o option allows you to rename the output file -- gcc -o bar.s foo.c -S would produce a bar.s file.

    Obviously, you can only rename the output file of a single source file. So if you run gcc on multiple source files, you cannot change the output names from the default because there's no way to specify the new name for each and every one of the multiple source files. You'd have the ridiculous situation of trying to give the same name to multiple output files in the same directory.


    Thanks for the question. I had never thought of trying to use the -o option with the -c and -S options, nor that it could create problems.


    Oh, sorry, I forgot. You fix it by either not using the -o option in those cases, thus allowing the output files to receive their default names, or by only compiling single source files when you do want to change the name of the output files with -o .
    Last edited by dwise1_aol; April 8th, 2003 at 08:04 PM.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    2
    Rep Power
    0
    how exactly would I change it?
  6. #4
  7. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,216
    Rep Power
    2222
    Originally posted by mrquestionman
    how exactly would I change it?
    Well, what are you trying to do?

    If you're compiling multiple source files to produce object files or assembly source, then don't use the -o option. Just let the output files default to the source-file names.

    If you really want to use the -o option, then compile only one source file at a time.

    If it's your IDE that's trying to do this on its own initiative, then check its settings and/or the make file to see what might be causing those options to be set.

    Sorry to say, but if the problem is Quincy-specific, you will probably need to find another Quincy user or whoever developed it. But still, check the IDE options and configuration to see if anything I mentioned has been selected.
    Last edited by dwise1_aol; April 9th, 2003 at 08:47 PM.

IMN logo majestic logo threadwatch logo seochat tools logo