0
我的名字是Hector Perez。我是一名來自危地馬拉學習計算機科學和音樂的國際學生。我對使用OpenNN進行計算機音樂項目非常感興趣。我今天嘗試創建一個具有適當依賴關係的Visual C++項目(如http://www.opennn.net/documentation/building_opennn.html中所述)。OpenNN在Visual Studio 2017中包含無法解析的外部符號
但是,我想經過一番嘗試後,我意識到我可能做錯了什麼。我在此消息結束後包含我的過程。 我非常感謝你,如果你可以指點我的教程,它一步一步地執行項目構建。
我的方法:
- 創建在Visual Studio C++項目。
- 右鍵單擊解決方案資源管理器中的應用程序文件夾,
- 找到VC++目錄下的屬性。
- 將依賴項的完整路徑複製到'Include Directories'中。
- 我構建了該項目,但發生錯誤 - 就好像找不到文件一樣。
- 如果我明確使用#include,會發現它們,但這可能不是意圖。
這是一種錯誤的,我得到。 (JUST WAY BIGGER!)
... SimplePatternRecognition.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenNN::NeuralNetwork::save(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " ([email protected]@[email protected]@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) referenced in function main
1>...C:\Users\Owner\documents\visual studio 2017\Projects\SimplePatternRecognition\x64\Debug\SimplePatternRecognition.exe : fatal error LNK1120: 46 unresolved externals
1>Done building project "SimplePatternRecognition.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
你需要告訴它來對抗鏈接庫也可能 – Flexo
這裏原是NO的.lib文件。 ---我嘗試用CMake構建OpenNN,並且後面建了一個使用Visual Studio創建的.sln文件。這創建了.lib文件。我有一個發展。我從研究中意識到可能需要添加.lib文件,以及.lib文件所在的目錄(Visual Studio項目)。使用CMake,我能夠建立.lib文件! – Hector
我現在嘗試將.lib文件添加到項目簡單模式識別。我現在遇到的問題是它說.lib是x86,而項目是x64。這是Visual Studio 2017中的一個控制檯項目,只有32位選項可用:( – Hector