delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/03/27/05:14:13

From: av568 AT rgfn DOT epcc DOT edu (Beautiful Savior Lutheran Church)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Compiler Error!
Date: 27 Mar 1997 05:45:25 GMT
Organization: The Rio Grande Free-Net, El Paso Community College, El Paso, TX
Message-ID: <5hd1hl$dur@news.epcc.edu>
References: <01bc3a5c$5bed1e80$460a20cf AT raider DOT netins DOT net>
NNTP-Posting-Host: rgfn.epcc.edu
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Dan Olson (no AT way DOT com) wrote:
> I have just recently gotten into C/C++ and I am using DJGPP.  I am still
> getting used to the command line stuff.  This is my command line, please
> tell me what is wrong: 
> gcc -Ic:\djgpp\include -g    -c c:\programs\benergy\benergy.c -o2
> c:\programs\benergy.o
> It gives an error message like this: c:\programs\benergy\benergy.o no such
> file or directory (ENOENT) any help with this problem would be greatly
> appreciated. Thanks.

You're mistaking -O2 for -o. If you want Optimization Level 2, here's a 
correct command line: (it assumes you're IN c:\programs\benergy)

gcc -g -O2 -c -Wall benergy.c -o benergy.o

Note the absence of -Ic:\djgpp\include; it's not needed if you've got 
your environment set up correctly.

--
Beautiful Savior Evangelical Lutheran Church - av568 AT rgfn DOT epcc DOT edu
We have what you need-- A Savior!

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019