I have to compile one programme. theoretically i need just to change the two path...

can you help me?


# Original
#CFLAGS= -O3 -ffunction-sections -fdata-sections --sysroot=/home/mguivarch/Desktop/buildroot-2011.08-advansee/build/staging/ 
#LDFLAGS= -Wl,--gc-sections -lpthread -lrt -lm -L/home/mguivarch/Desktop/buildroot-2011.08-advansee/build/staging/usr/lib

# Change I made
CFLAGS= -O3 -ffunction-sections -fdata-sections --sysroot=/home/mihai/Desktop/MIPSEE/Programme
LDFLAGS= -Wl,--gc-sections -lpthread -lrt -lm -L/usr/include


all: $(EXEC)

livic_sync: capture.o main.o clientTCP.o
$(CC) -o livic_sync capture.o main.o clientTCP.o $(LDFLAGS)

clientTCP.o: ClientTCP.c main.h
$(CC) -o clientTCP.o -c ClientTCP.c $(CFLAGS)

capture.o: capture.c ClientTCP.h
$(CC) -o capture.o -c capture.c $(CFLAGS)

main.o: main.c capture.h
$(CC) -o main.o -c main.c $(CFLAGS)

rm *.o

mrproper: clean
rm $(EXEC)

vPro:~/Desktop/MIPSEE/Programme$ make

gcc -o capture.o -c capture.c -O3 -ffunction-sections -fdata-sections --sysroot=/home /mihai/Desktop/MIPSEE/Programme

capture.c:9:19: fatal error: stdio.h: No such file or directory

compilation terminated.

make: * [capture.o] Error 1

:~/Desktop/MIPSEE/Programme$ ls -l

total 216

-rw-r--r-- 1 mihai mihai 15905 Oct 30 19:34 capture.c

-rw-r--r-- 1 mihai mihai 453 Jul 17 2012 capture.h

-rw-r--r-- 1 mihai mihai 3228 Jul 18 2012 ClientTCP.c

-rw-r--r-- 1 mihai mihai 217 Sep 13 2012 ClientTCP.h

-rw-r--r-- 1 mihai mihai 948 Feb 10 2012 ClientUDP.c

-rw-r--r-- 1 mihai mihai 141 Feb 9 2012 ClientUDP.h

drwxrwxr-x 18 mihai mihai 4096 Nov 1 10:11 html

-rw-r--r-- 1 mihai mihai 6459 Oct 30 19:31 main.c

-rw-r--r-- 1 mihai mihai 1374 Jun 21 2012 main.h

-rw-r--r-- 1 mihai mihai 865 Nov 1 12:46 Makefile

-rw-r--r-- 1 mihai mihai 870 Nov 1 12:30 Makefile~

-rw-rw-r-- 1 mihai mihai 75566 Nov 1 10:11 mihaiDoxygenConfig

-rw-rw-r-- 1 mihai mihai 75568 Oct 30 14:57 mihaiDoxygenConfig~

drwxr-xr-x 3 mihai mihai 4096 Oct 30 19:55 MIPSEE


:~/Desktop/MIPSEE/Programme$ locate stdio.h









  • Usage of the --sysroot=dir option tells the compiler to look in dir/usr/include for the standard header files instead of the standard system location /usr/include - this is typically used in cross-compilation scenarios - is that what you are trying to do? if so you will likely need the appropriate SDK (target system header files and libraries) for the MIPSEE target installed into your ~/Desktop/MIPSEE/Programme/ directory. – steeldriver Nov 1 '13 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.