Delphi IOS linker error library not found

你离开我真会死。 提交于 2019-12-13 02:59:31

问题


I'm trying to use a third party framework, that needs a library, in Delphi IOS. To get Delphi to link it in i've entered the following statement:

procedure StubProc1; cdecl; external 'AerServSDK.a' dependency 'libxml2.2';

When i build it i get the following error:

[DCC Error] E2597 ld: library not found for -llibxml2.2

The library is in the usr\lib directory, and it doesn't matter whitch library i try. Apparently some searchpath needs to be updated, but where and how??


回答1:


The solution is, to omit the "lib" part of the library name. So it's:

procedure StubProc1; cdecl; external 'AerServSDK.a' dependency 'xml2.2';



回答2:


You must add the path to the library in the source path of the project (like you do with .pas file).

add theses 2 rows :

procedure StubProc1; cdecl; external 'AerServSDK.a';
procedure StubProc2; cdecl; external 'libxml2.2';

AerServSDK.a and libxml2.2 (ie: the file libxml2.2 without any extension) must be in your source path



来源:https://stackoverflow.com/questions/50781443/delphi-ios-linker-error-library-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!