When I compile this extremely simple program I get this cryptic error:
"warning: passing argument 1 of "printf" from incompatible pointer type"
Here is the program.
# include <stdio.h
int main()
{
printf(stdout, "this is a test\n");
}
What ever could be wrong? :)
-----------------------------
Never mind. Incompatible versions of C.
The program source was from an earlier version.
Here is the corrected source:
# include <stdio.h
int main()
{
printf("this is a test\n");
}
Now it apparently compiles it but I can not find the executable.
Anybody have any idea where gcc hides it? :)
Paul Lamar
With no other options, I think the object file (executable) is named
a.out.
Matt-
If you want the output of the compiler to name it something else, use
"-o <filename"..
Matt-
You are right. It does default to a.out. Who would of thunk. Weird :)
Also -o <file name worked. Thanks Matt
C is incredibly dumb and picky :)
The QB IDE was head and shoulders above this nonsense.
Too bad MS killed it.
I have Anjuta IDE but so far it crashes when I try to build a file
or execute it. QB and PB never did/do that silly stuff.
I get the impression that the C IDE and the C compilers are not
using the full power of the computer to help the programmer.
The complier must be told exactly what to do in excruciating detail.
QB would correct your variable spelling automatically.
Paul Lamar
--Kenny A.
http://websites.expercraft.com/kennya/
Try using the 'eclipse' open source IDE. It will create makefiles for you,
integrated debugger, etc. Much more civilized. Be warned, it takes my
interns all summer to master just the toolset when working directly with
gcc, ln, gdb, etc.
--Kenny A.
Oh boy! I am too old to learn all these new tricks :)
Thanks Kenny. I'll try the eclipse IDE.
Paul Lamar
--
The Rotary Engine NewsLetter. Powered by Linux.
ACRE NL web site.
http://www.rotaryeng.net
Youtube key word UTUBPLEASE
Copyright 1998-2009 All world wide rights reserved.