Hi.
Im having some trouble creating some object files using the c flag for gcc
fred.c
bill.cCode:#include <stdio.h> void fred(int arg) { printf(“fred: you passed %d\n”, arg); }
Code:#include <stdio.h> void bill(char *arg) { printf(“bill: you passed %s\n”, arg); }Google is of no help on this one. It should create fred.o and bill.o. Strange.Code:$gcc -c fred.c - fred.c bill.c fred.c: In function ‘fred’: fred.c:5: error: stray ‘\342’ in program fred.c:5: error: stray ‘\200’ in program fred.c:5: error: stray ‘\234’ in program fred.c:5: error: expected ‘)’ before ‘:’ token fred.c:5: error: stray ‘\’ in program fred.c:5: error: stray ‘\342’ in program fred.c:5: error: stray ‘\200’ in program fred.c:5: error: stray ‘\235’ in program fred.c:5: warning: passing argument 1 of ‘printf’ from incompatible pointer type bill.c: In function ‘bill’: bill.c:5: error: stray ‘\342’ in program bill.c:5: error: stray ‘\200’ in program bill.c:5: error: stray ‘\234’ in program bill.c:5: error: expected ‘)’ before ‘:’ token bill.c:5: error: stray ‘\’ in program bill.c:5: error: stray ‘\342’ in program bill.c:5: error: stray ‘\200’ in program bill.c:5: error: stray ‘\235’ in program bill.c:5: warning: passing argument 1 of ‘printf’ from incompatible pointer type
Any ideas?



LinkBack URL
About LinkBacks




CornedBee