Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

can you help me?

Makefile

# Original
#CC=arm-1136jf_s_r1_vfp_hard_float-linux-gnueabi-gcc
#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
CC=gcc 
CFLAGS= -O3 -ffunction-sections -fdata-sections --sysroot=/home/mihai/Desktop/MIPSEE/Programme
LDFLAGS= -Wl,--gc-sections -lpthread -lrt -lm -L/usr/include


EXEC=livic_sync

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)


clean:
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$


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

/usr/include/stdio.h

/usr/include/boost/iostreams/filter/stdio.hpp

/usr/include/c++/4.6/tr1/stdio.h

/usr/include/glib-2.0/glib/gstdio.h

/usr/include/i386-linux-gnu/bits/stdio.h

/usr/include/unicode/ustdio.h

/usr/lib/perl/5.14.2/CORE/nostdio.h

/usr/lib/syslinux/com32/include/stdio.h

share|improve this question
    
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
    
@steeldriver - thanks –  MihaiC Nov 4 '13 at 7:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.