【问题标题】:Qt compile error when use tslib with angstrom g++将 tslib 与 angstrom g++ 一起使用时 Qt 编译错误
【发布时间】:2012-02-10 14:12:18
【问题描述】:

在上述情况下,我收到以下编译错误。有人能告诉我为什么吗?我使用以下文档作为我的指导方针

http://billforums.station51.net/viewtopic.php?f=8&t=15

ts_test.o: In function `main':
ts_test.c:(.text+0x1d8): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0xa7c): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
ts_harvest.o: In function `main':
ts_harvest.c:(.text+0x5d0): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0xa7c): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_harvest] Error 1
make[2]: Leaving directory `/home/thwijeth/Downloads/tslib-1.0/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thwijeth/Downloads/tslib-1.0'
make: *** [all] Error 2
ts_test.o: In function `main':
ts_test.c:(.text+0x1d8): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0xa7c): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_test] Error 1
ts_harvest.o: In function `main':
ts_harvest.c:(.text+0x5d0): undefined reference to `rpl_malloc'
fbutils.o: In function `open_framebuffer':
fbutils.c:(.text+0xa7c): undefined reference to `rpl_malloc'
collect2: ld returned 1 exit status
make[2]: *** [ts_harvest] Error 1
make[2]: Leaving directory `/home/thwijeth/Downloads/tslib-1.0/tests'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/thwijeth/Downloads/tslib-1.0'
make: *** [all] Error 2

【问题讨论】:

    标签: qt embedded touchscreen angstrom-linux


    【解决方案1】:

    simple Google search on "rpl_malloc" 发现了许多与此问题相关的参考资料,并提供了解决方案的建议。问题是 Autoconf 配置脚本由于某种原因无法找到malloc,并试图回退到rpl_malloc。有几个建议可以解决这个问题:

    1.) 在运行 configure 之前定义 ac_cv_func_malloc_0_nonnull=yes 环境变量,例如通过运行 configure(假设是 bash shell)为:

    ac_cv_func_malloc_0_nonnull=yes ./configure <your configure options>
    

    2.) 手动更改配置脚本以注释掉 rpl_malloc problem AC_FUNC_MALLOC 行,并为其添加前缀 #

    (参考:this blog post, among others

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-07-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-22
      相关资源
      最近更新 更多