zoukankan      html  css  js  c++  java
  • Delphi调用Android的.so文件(转)

    原地址:http://zhidao.baidu.com/link?url=fzqefMM44ljXA5BnAbkX44SapCUteyzlXFvGLKvukBivm9AB-w39P_h7eX1ty-GQX8j3A03AZBPat6yMqjeY4Sc5jlaayMRVOigzCElm_Ky

    so本质就是个动态链接库
    用gcc编译就能生成了

    Delphi  XE里

    if not Tfile.Exists(TPath.GetDocumentsPath+'/libserial_port.so') then
      begin
        showmessage(TPath.GetDocumentsPath+'/libserial_port.so  not found');
      end;
      Handle1:=LoadLibrary(pchar(TPath.GetDocumentsPath+'/libserial_port.so'));//动态装入库
    if Handle1<>0 then //找到库
    begin
        fun1:=GetProcAddress(Handle1,'openport');
    //搜索库函数Add,并返回函数指针
    if Assigned(fun1) then
        begin
    ......



    至于上面的GetDocumentsPath 或者别的目录也可以 参看TPath的说明和so文件存放目录有关系

    另外值得注意的事传递的字符串  xe中是双字节的。

  • 相关阅读:
    hadoop 配置
    spark 学习网站和资料
    spark-submit 提交任务及参数说明
    python 浮点运算
    nginx 和 php
    clojure 语法
    编程语言
    spark
    mvn 与 pom.xml
    偏导数与偏微分
  • 原文地址:https://www.cnblogs.com/LittleTiger/p/4556628.html
Copyright © 2011-2022 走看看