yzhiju

yzhiju

0个粉丝

12

问答

0

专栏

0

资料

yzhiju  发布于  2018-01-02 17:51:02
采纳率 0%
12个问答
2282

hi3536 交叉编译加上-static 程序运行卡死问题

 
arm-hisiv300-linux-gcc -o test test.c -ldl


#include
#include
#include
#include
#include
//动态链接库路径
#define LIB_CACULATE_PATH "./libAirCommand.so"
//函数指针
typedef int (*CAC_FUNC)(int, int,int);

int main()
{
    void *handle;
    char *error;
    CAC_FUNC cac_func = NULL;

    //打开动态链接库
    handle = dlopen(LIB_CACULATE_PATH, RTLD_LAZY);
    if (!handle) {
    fprintf(stderr, "%s\n", dlerror());
    exit(EXIT_FAILURE);
    }
    printf("open success\n");
    //清除之前存在的错误
    dlerror();
   //关闭动态链接库
    dlclose(handle);
    exit(EXIT_SUCCESS);
}


Mem: 132156K used, 1486932K free, 0K shrd, 13924K buff, 87776K cached
CPU0:  0.0% usr  0.0% sys  0.0% nic  100% idle  0.0% io  0.0% irq  0.0% sirq
CPU1:  100% usr  0.0% sys  0.0% nic  0.0% idle  0.0% io  0.0% irq  0.0% sirq
CPU2:  0.0% usr  0.0% sys  0.0% nic  100% idle  0.0% io  0.0% irq  0.0% sirq
CPU3:  0.0% usr  0.0% sys  0.0% nic  100% idle  0.0% io  0.0% irq  0.0% sirq
Load average: 0.22 0.06 0.06 3/56 1059
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
1058  1040 root     R      948  0.0   1 24.9 ./dlltest


我来回答
回答2个
时间排序
认可量排序

david

33个粉丝

368

问答

253

专栏

229

资料

david 2018-01-02 18:51:39
认可0
卡在什么地方?

yzhiju

0个粉丝

12

问答

0

专栏

0

资料

yzhiju 2018-01-03 09:00:19
认可0
[quote][url=forum.php?mod=redirect&goto=findpost&pid=82823&ptid=38589]david 发表于 2018-1-2 18:51[/url]
卡在什么地方?[/quote]

(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x00009108 in _dl_find_hash ()
(gdb) bt
#0  0x00009108 in _dl_find_hash ()
#1  0x00009c80 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
+ 添加网盘链接/附件

Markdown 语法

  • 加粗**内容**
  • 斜体*内容*
  • 删除线~~内容~~
  • 引用> 引用内容
  • 代码`代码`
  • 代码块```编程语言↵代码```
  • 链接[链接标题](url)
  • 无序列表- 内容
  • 有序列表1. 内容
  • 缩进内容
  • 图片![alt](url)
相关问答
无更多相似问答 去提问
举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

易百纳技术社区