www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/14/22:37:45

To: djgpp AT delorie DOT com
Subject: Error in single-step compilation.
Message-ID: <19961215.193027.5007.0.chambersb@juno.com>
From: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Sat, 14 Dec 1996 22:27:10 EST

I have successfully compiled programs with the input file a .c file, and
the output file a .exe with one call to gcc.
However, I just had an error doing so.

t.c:
#include <stdio.h>

int main(void)
{
 int n;
 printf("Please enter a number:");
 scanf("%d",&n);
 printf("Modulated by 40: %d",n%40);
 return(0);
}

tc.bat (used for compiling it)
@gcc -c t.c -o t.exe -v

The verbose listing showed that the following were called:
cpp
cc1
as
(I've omitted their arguments)

Gcc would then exit, with the resulting (Object?) file being t.exe

The same thing would happen when I rewrote t.c as a 'hello world' style
program.

Is this due to the @? (In batch files, this tells ms-dog not to echo that
line to the screen.  I think it means to get input from a file for djgpp,
doesn't it?)

Really messed up,
...Chambers

- Raw text -


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