简体   繁体   English

链接器无法在C中归档实现文件

[英]linker can't file the implementation file in c

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 . 我正在arria v开发套件板上使用eclipse ARM ds-5进行工作,并且我配置了环境,就像他们在其网站上显示的那样: 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. 我正在尝试使用alt_sdmmc.h文件。 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). 当我尝试构建程序时,将以状态码1和未定义的“ sd_mmc_init”引用(例如)执行。

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. 我试图将alt_sdmmc.c文件放到项目工作区中,这对其他内容很有帮助,但它却很有价值,因为它也无法编译。 the file is located in C:\\altera\\15.0\\embedded\\ip\\hps\\altera_hps\\hwlib\\include\\alt_sdmmc.h. 该文件位于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 hwlib也有\\ src \\ hwrmgr \\“ .... c”而不是\\ include \\我相信问题是链接器无法识别此文件夹

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 我已经从stackoverflow上阅读了很多有关此问题的答案(未定义的引用),大多数情况下是键入错误,这里不是这种情况

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

Then add 然后加

"C:\\altera\\15.0\\embedded\\ip\\hps\\altera_hps\\hwlib" “C:\\ Altera的\\ 15.0 \\嵌入\\ IP \\ HPS \\ altera_hps \\ hwlib”


to the library search path (-L) 到库搜索路径(-L)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM