Forum Discussion
Altera_Forum
Honored Contributor
20 years agoDear monkeyboy.
I'm tring to include "altera_avalon_pio.h", as you wrote. (1) Adding this line to my c-file.# include "altera_avalon_pio.h" (2) Modifying CFLAG in makefile. CFLAGS = -I$(INSTALL_DIR)/include -I'$(SOPC_KIT_NIOS2)'/components/altera_avalon_pio/inc -I$(PREFIX)/include/cyg/hal But when I built the project, this error message appeared.make INSTALL_DIR=/cygdrive/c/temp/ecos_install all
nios2-elf-gcc -c -o hello.o -I/cygdrive/c/temp/ecos_install/include -I'c:/altera/kits/nios2'/components/altera_avalon_pio/inc -I/include/cyg/hal -g -O3 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -DSYSTEM_BUS_WIDTH=32 -mhw-mul -mhw-mulx -mno-hw-div hello.c
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-fvtable-gc" is valid for C++/ObjC++ but not for C
hello.c:3:31: altera_avalon_pio.h: No such file or directory
make: *** Error 1 What is wrong? Please tell me why. Thank you. Best regards.