[code:c]
#include "stdio.h"
int main()
{
printf("hello, world \n");
return 0;
}
[/code]
Makefile:
[code]
CC=arm-uclibc-gcc
EXEC = hello
OBJS = hello.o
CFLAGS +=
LDFLAGS+=-elf2flt -static
all:$(EXEC)
$(EXEC): $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS)
clean:
-rm -f $(EXEC) *.elf *.gdb *.o
[/code]
make一下发现错误:
hello.c:1: '#include' expects 'FILENAME' or
原来原因就是:不能在windows里写程序拿到linux里去编译 -_-!
没有评论:
发表评论