AnsweredAssumed Answered

如何在MCUXpresso IDE中使用第三方封装函数库(How to use the foreign library in "MCUXpresso IDE")

Question asked by 志荣 陈 on Mar 12, 2019
Latest reply on Mar 26, 2019 by 志荣 陈

大家好!目前我有一个基于MCUXpresso IDE的LPC822M101的项目需要调用外来库文件(对方不披露源代码),但是发现调用过程中出现 undefined reference to `gt_24_data_B',然后网上搜索资料时发现只能找到自建lib.a的link方式(但这种方式下编写的一个简单return 程序竟然无法测量返回值(提示优化过度,但是我只做了1级优化)),对此实在盲目无策,不知道大家有没有遇到过同样的问题?多谢解答


Hello everyone ,Now I have a project is use the  MCU of "LPC822M101",its based on the MCUXpresso IDE,I have to include a foreign library(lib.a) to use some function.However,when I add the "xxx.a" and the "xxx.h"to the source file(it has inlcude to the project),then build the porject ,its display an error in the build console":undefined reference to `gt_24_data_B' ".Then, I have get a method whitch is"creating and linking to library projects"(here is the URL:Creating and Linking to Library Projects )

and this method can indeed call the foreign library function,but the return is can not be viewed when I debug it(its reminds me this value has been "optimized out"),but the optimization level is just set to "Optimize(-O1)".And then,because the source code would not be show me any more,so its useless in my project.

I wanna a useful method to build this porject successful, thanks!