2
我正在創建一個處理所有瀏覽器和平臺上的操縱桿輸入的瀏覽器插件。它在Linux和Windows上工作,但我無法鏈接到XCode中的OIS庫。使用CMake在OSX上的XCode中鏈接OIS
我已經建立了OIS,並得到libOIS.a和OIS.dylib和我與CMake的聯繫起來如下:
find_library(CARBON NAMES Carbon)
find_library(IOKIT NAMES IOKit)
target_link_libraries(${PROJECT_NAME}
${PLUGIN_INTERNAL_DEPS}
${CARBON}
${IOKIT}
"${CMAKE_CURRENT_SOURCE_DIR}/lib/libOIS.a"
)
但我每一次我嘗試使用OIS班時間仍然得到錯誤從我的代碼,並建立工程:
ld warning: in /Users/Lana/Documents/STRd6/boomsticks/Boomstick/lib/libOIS.a, missing required architecture x86_64 in file
Undefined symbols:
"OIS::InputManager::destroyInputSystem(OIS::InputManager*)", referenced from:
JoysticksHandler::~JoysticksHandler()in Joysticks.o
JoysticksHandler::~JoysticksHandler()in Joysticks.o
"OIS::InputManager::createInputSystem(std::multimap<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&)", referenced from:
JoysticksHandler::initialize() in Joysticks.o
"OIS::InputManager::enableAddOnFactory(OIS::InputManager::AddOnFactories)", referenced from:
JoysticksHandler::initialize() in Joysticks.o
"OIS::InputManager::getNumberOfDevices(OIS::Type)", referenced from:
JoysticksHandler::initialize() in Joysticks.o
"typeinfo for OIS::Exception", referenced from:
GCC_except_table44 in Joysticks.o
"OIS::InputManager::createInputObject(OIS::Type, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
JoysticksHandler::initialize() in Joysticks.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
我不知道的XCode什麼,但我能得到相同的代碼建築在Linux和Windows非常類似的過程。
您是否曾找到答案? – CoolAJ86