<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > arm-linux下交叉編譯json-c-0.9庫遇到的編譯問題

          arm-linux下交叉編譯json-c-0.9庫遇到的編譯問題

          作者: 時間:2016-11-11 來源:網(wǎng)絡(luò) 收藏
          在linux下比較成熟的json庫要屬json-c-0.9. 但是悲劇的是好多人編譯不通過。

          編譯json-c arm版本 貌似可以順利通過, 但是鏈接json-c動態(tài)庫的時候會有提示: undefined reference to rpl_malloc

          本文引用地址:http://www.ex-cimer.com/article/201611/316651.htm

          [我的環(huán)境]

          虛擬機(jī):vmware 7.1.3

          操作系統(tǒng):ubuntu8.04

          arm-linux-gcc版本: 4.2.2

          [解決方案]

          config.h.in里定義了
          #undef malloc
          #undef realloc

          用//把這兩行注釋掉,

          然后

          autoconf

          ./configure --prefix=/usr/local/json-c-0.9forarm --host=arm-linux 這樣可自動調(diào)用arm-linux-gcc, 安裝在/usr/local/json-c-0.9forarm 下,不要按默認(rèn)的在/usr/local/lib下,和宿主機(jī)混了。

          make && make install

          這樣就OK了。 至于為什么只生成了.a沒有生成了.so,不管它了,能用已經(jīng)萬幸了。

          最后,別忘了在編譯時 -L/usr/local/json-c-0.9forarm/lib/ 指定lib路徑。



          關(guān)鍵詞: arm-linux交叉編譯編譯問

          評論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();