This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Program


> Myke and Chelle wrote:
> 
> To whom it may concern,
> I have purchased the Teach yourself C++ 6th edition.
> After I put the CD in my CD-ROM, I installed the program to the
> default directory.
> When I run the IDE and write any code (program), I get errors and it
> does not complete the build. I was wondering what I should set in the
> options for this program to build and execute the programs I write.
> The specific error I get all the time is as follows:
> 
> gcc.exe cannot specify -o with -c or -S and multiple compilations
> 

You should try the compilation by hand.  We have no idea about their
IDE.

Likely it is passing something like:

gcc -c foo.c bar.c -o blah

to gcc.  Gcc doesn't handle this, so you'll need to compile it
otherwise.

gcc -c foo.c -o foo.o
gcc -c bar.c -o bar.o
gcc foo.o bar.o -o blah

or for simple one file programs:

gcc foo.c -o foo

-eric


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]