Sujet : Re: Compiler utility
De : NoEMail (at) *nospam* home.org (root)
Groupes : comp.os.linux.miscDate : 07. Feb 2025, 23:19:52
Autres entêtes
Organisation : Linux Advocacy
Message-ID : <vo60u8$3mapm$1@dont-email.me>
References : 1 2 3 4
User-Agent : slrn/1.0.2 (Linux)
Richard Kettlewell <
invalid@invalid.invalid> wrote:
>
Post some example code, the exact command you used to compile it, and
the errors you go.
>
Thanks for the offer Richard. I have moved beyond the problem.
I have what I need with the 11.2.0 compiler and the 6.12.12 kernel.
I think this will give an example of what I found:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termio.h>
#include <sys/wait.h>
#include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include <ctype.h>
int main();
//lots more code in here
int main(argc,argv)
int argc;
char *argv[];
{
exit(0);
}
The command first command would have been
simply gcc program.c -o program
then I tried stuff like:
gcc --std=gnu89 program.c -o program
The actual program I looked at had used forward
references and I put a large number of the
declarations up front. The new compiler flagged
the redefinitions as errors, not warnings as
might have been done with a duplicate #define.
I can't remember now what program it was, nor
for what compiler I originally used that would
have allowed the forward references.