1
我的代碼是相同的this問題,我問較早所以在這裏重複它蘋果的Mach-O鏈路(Id)的錯誤
這是沒有意義的,我得到的錯誤:
Undefined symbols for architecture x86_64:
"_stdscr", referenced from:
_screen_init in screen.o
"_werase", referenced from:
_screen_init in screen.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我過去有過這個錯誤,我覺得它與重複函數名稱或某事有關,但我不知道如何調試它。
編輯:
添加libncurses.dylib文件到我的項目後,上面所討論的錯誤已經消失了,但一個新的錯誤又出現了,當我打電話screen_init();在我的main.cpp:
// main.cpp中
#include "screen.h"
int main(){
screen_init();
}
//新的錯誤
Undefined symbols for architecture x86_64:
"screen_init()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
幾乎相同的錯誤除了現在在我的主。是否還有另一個我失蹤的圖書館?這些錯誤非常神祕,並不是很有幫助。
我已經走了,並將該庫添加到我的項目,它帶走了錯誤,但是當我調用screen_init();從我的主要現在,我得到另一個Mach-O鏈接錯誤。有關詳細信息,請參閱上面的編輯 – jasonaburton 2012-03-03 17:08:10