Can I use Objective C codes with Delphi XE5

随声附和 提交于 2019-12-12 02:39:14

问题


I am trying to write an ios program wiht Delphi XE5. You know there are bunch of ready to use Objective C codes to accomplish a lot of things. I am just wondering if it is possible to use those Objective C codes under Delphi XE5. Like we use Assembly codes between code line blocks

asm
    // ...
  end;

can we say

ObjectiveC
My Objective C code
end;

thanks in advance


回答1:


The mobile Delphi compiler compiles Object Pascal only. What you can do is to compile the Obj-C code to object files and link those using $LINK. Or compile the Obj-C into a shared object and consume that.




回答2:


No, you cannot type the objective-c codes between the pascal codes.

It makes sense. Imagine the mess it will create.



来源:https://stackoverflow.com/questions/20751747/can-i-use-objective-c-codes-with-delphi-xe5

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