0

i am working with eclipse ARM ds-5 on an arria v development kit board and i configured the environment like they show on their website : https://developer.arm.com/products/software-development-tools/ds-5-development-studio/resources/tutorials/getting-started-with-ds-5-development-studio. i am trying to use alt_sdmmc.h file. The program found the file but when i am trying to use any of the file function it doesn't auto complete the function or finds it.

when i try to build the program executes with status code 1 and with an undefined reference to 'sd_mmc_init'(for example).

can you halp me solve this problem ?

I tried to put the alt_sdmmc.c file in the project workspace it helped with other stuff but it only makes it worth because it couldn't compile it as well. the file is located in C:\altera\15.0\embedded\ip\hps\altera_hps\hwlib\include\alt_sdmmc.h.

the hwlib also have \src\hwrmgr\ "... .c" instead of \include\ i believe the the problem is that the linker doesn't recognize this folder

i've read alot of answers from stackoverflow about this problem (undefined reference) and most of the cases it was typing error which is not the case in here

alk
  • 69,737
  • 10
  • 105
  • 255

1 Answers1

0

Go to Projcet->Properties->C/C++ Build -> Tool Settings -> C Linker

Then add

"C:\altera\15.0\embedded\ip\hps\altera_hps\hwlib"


to the library search path (-L)

Adwait Patil
  • 171
  • 1
  • 10
  • hi thanks for the help, i fixed the problem. eventually this wasn't the issue. my project is compiled with g++ and the file they provided there was extern "c" missing. after that i needed to compile with gcc instead of g++ because their code was not supported. by the way the -L didn't work because it is not a library; – user3539906 Apr 06 '17 at 12:05