Rockbox Development > Starting Development and Compiling

Compiling C with VMware

<< < (2/4) > >>

Llorean:
Because "A simple printf statement" still has to be defined somewhere. "stdio" is short for standard input/output (if I recall correctly). printf is part of the standard output.

saratoga:
It should compile without the include since gcc includes stdio.h by default on every machine i've tried.

More interesting is what is on lines 1 and 2?  I see thats where the errors are coming from, but you haven't included them in your code.

tdtooke:
When I tried to compile that with wxdevcpp it required me to have that include.  When I just ran mingw32-gcc it did compile.  Not sure what the deal is since wxdevcpp would've just ran mingw32-gcc to compile that anyway, but it's a thought.

Edit: It compiles with cygwin as well.  Only thing I can think of at this point is making sure there is a blank line at the end of your file.  Some compilers seem to like that in my experiences.

mschneider:
Ok, but what about all the "stray '\' in program" errors? The helloworld code i posted first is the entire file i'm trying to compile. But there are not backslashes on lines 1, 2 or 4.

saratoga:

--- Quote from: mschneider on August 04, 2007, 12:31:38 PM ---Ok, but what about all the "stray '\' in program" errors? The helloworld code i posted first is the entire file i'm trying to compile. But there are not backslashes on lines 1, 2 or 4.

--- End quote ---

The program you posted is 5 lines long, the one you tried to compile is 7 lines long.  Type "cat hello.c" and post what it gives you.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version