Forum Discussion
Altera_Forum
Honored Contributor
9 years agoDear Kazu,
Finally I have solved the include path problem by setting path to C_INCLUDE_PATH. Thank for you help. However, it still gives these error. I have searched online for the solution. Maybe the project is not linked to the library. Then I tried to set some path to LD_LIBRARY_PATH. However, the error still there. I think I didn't set the correct library path. Do you know where should the library path of SD controller located? Will it be in the Project or Project_BSP folder? Or actually it's due to other problem? Thank you so much for you help.mun@ubuntu:~/Hello$ nios2-linux-gnu-gcc hello_world.c -o hello
hello_world.c: In function 'main':
hello_world.c:40: warning: incompatible implicit declaration of built-in function 'calloc'
hello_world.c:40: warning: initialization from incompatible pointer type
/tmp/cc7uxjmj.o: In function `main':
hello_world.c:(.text+0x1e8): undefined reference to `sd_set_clock_to_max'
hello_world.c:(.text+0x1f4): undefined reference to `sd_fat_mount_all'
hello_world.c:(.text+0x310): undefined reference to `_impure_ptr'
hello_world.c:(.text+0x314): undefined reference to `_impure_ptr'
hello_world.c:(.text+0x368): undefined reference to `alt_up_char_buffer_open_dev'
hello_world.c:(.text+0x374): undefined reference to `alt_up_char_buffer_init'
hello_world.c:(.text+0x37c): undefined reference to `alt_up_char_buffer_clear'
hello_world.c:(.text+0x450): undefined reference to `alt_up_char_buffer_string'
hello_world.c:(.text+0x464): undefined reference to `alt_up_char_buffer_string'
hello_world.c:(.text+0x478): undefined reference to `alt_up_char_buffer_string'
hello_world.c:(.text+0x71c): undefined reference to `alt_up_char_buffer_draw'
hello_world.c:(.text+0x75c): undefined reference to `alt_up_char_buffer_string'
collect2: ld returned 1 exit status
--- Quote Start --- Hi, You can instruct the header file search path by the compiler switch -I"search path". Please refer to the manual of GCC. But maybe, I think you are using uClinux without MMU. If you want to use Bluetooth applications, I recommend you to install genuine Linux with MMU. Kazu --- Quote End --- What do you meant by genuine Linux with MMU? I did followed the link below to build the hardware architechture in QSYS: https://www.youtube.com/watch?v=rxlyezof0rs The uClinux dist that I used is downloaded from the link below: ftp://ftp.altera.com/outgoing/nios2-linux/20120802/ The Linux OS that I used is Ubuntu 14.04.4 LTS 32-bit. Best Regards, Jun Mun