[問題] linux呼叫so函式,執行出現undefined s..
各位前輩好,目前遇到了一個問題,在建置so library檔時,呼叫內部函式出現了undefi
ned symbol,目前完全不知道解決的方向,希望各位前輩能夠指導
https://i.imgur.com/7yepT73.jpg

這是我的程式碼
https://glot.io/snippets/fvwlmsu43t
這是123.py的程式碼
https://glot.io/snippets/fvwz2xprsu
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.225.58.19 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1613406501.A.169.html
→
02/16 00:36,
5年前
, 1F
02/16 00:36, 1F
https://glot.io/snippets/fvwlmsu43t
我是使用makefile產生的,這是我的程式碼
※ 編輯: asd24693120 (36.225.58.19 臺灣), 02/16/2021 01:05:40
※ 編輯: asd24693120 (36.225.58.19 臺灣), 02/16/2021 01:06:28
→
02/16 05:21,
5年前
, 2F
02/16 05:21, 2F
→
02/16 05:51,
5年前
, 3F
02/16 05:51, 3F
因為不只用到幾個function,所以可能不能用,之前我就有試過ctypes
推
02/17 11:16,
5年前
, 4F
02/17 11:16, 4F
→
02/17 11:18,
5年前
, 5F
02/17 11:18, 5F
有的,我有加上exten c了,但結果仍然是symbol undefined
https://i.imgur.com/XVBXopg.jpg

※ 編輯: asd24693120 (118.169.185.235 臺灣), 02/19/2021 11:33:40
※ 編輯: asd24693120 (118.169.185.235 臺灣), 02/19/2021 11:35:29
→
02/20 02:31, , 6F
02/20 02:31, 6F
→
02/20 02:31, , 7F
02/20 02:31, 7F
→
02/20 02:31, , 8F
02/20 02:31, 8F
→
02/20 02:31, , 9F
02/20 02:31, 9F
Z大您好,那想請問我如果要再試試ctypes要參考哪一篇文章呢?因為我之前有參考過幾
篇,但因為他們對於加extern c的位置解釋的模糊不清,因此也有可能是我理解錯意思,
希望z大能夠指導,我能私下寄信給您嗎?
※ 編輯: asd24693120 (111.250.156.31 臺灣), 02/20/2021 16:37:07
Python 近期熱門文章
PTT數位生活區 即時熱門文章