第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

LOGD只能在native-lib.cpp才能打印出日志,而在其他.cpp文件中就會報錯: error: undefined reference to '__android_log_print'

還未解決

error:?undefined?reference?to?'__android_log_print'clang++:?
error:?linker?command?failed?with?exit?code?1?
(use?-v?to?see?invocation)ninja:?build?stopped:?subcommand?failed.


正在回答

1 回答

可以新建一個 target_link_libraries 函數(shù),將log日志庫與你的其它.cpp編譯的動態(tài)庫鏈接。?

target_link_libraries 內(nèi)部也會受到排列順序的影響,將其它.cpp文件編譯的動態(tài)庫名字放在第一個,就可以正常打印log,但是有可能會導(dǎo)致其它庫出現(xiàn) undefined reference 錯誤。

3 回復(fù) 有任何疑惑可以回復(fù)我~
#1

qq_精慕門6559993

改變了target_link_libraries的內(nèi)部順序,發(fā)現(xiàn)可以。但是不知道什么原因??吹酱罄械幕貜?fù)終于知道什么原因了
2022-06-20 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

LOGD只能在native-lib.cpp才能打印出日志,而在其他.cpp文件中就會報錯: error: undefined reference to '__android_log_print'

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號