问题
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