2016-07-07 70 views
-1

在完成從Visual Studio 2012到2015的全面重新格式化和升級之後,我的程序將無法編譯並吐出鏈接器錯誤。我查看了路徑,鏈接器和其他東西,它看起來就像它應該工作一樣,我也在引用的類中查看了我的代碼,但它們都使用正確的包含和名稱空間進行設置。SFML不再工作

在我重新格式化之前,所有文件(包括SFML庫和我自己的源代碼)都保存在我的保管箱中,因此沒有文件更改文件夾,我也進行了雙重檢查。

整個項目是用C++

1>------ Build started: Project: Starfall, Configuration: Debug x64 ------ 
1>AnimatedSprite.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __cdeclsf::RectangleShape::operator=(class sf::RectangleShape &&)" ([email protected]@@[email protected][email protected]@Z) referenced in function "public: __cdecl AnimatedSprite::AnimatedSprite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct HandlerContainer *)" ([email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@@Z) 
1>DynamicSprite.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __cdecl sf::RectangleShape::operator=(class sf::RectangleShape &&)" ([email protected]@@[email protected][email protected]@Z) 
1>CuboidDrawable.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::ConvexShape & __cdecl sf::ConvexShape::operator=(class sf::ConvexShape &&)" ([email protected]@@[email protected][email protected]@Z) referenced in function "public: __cdecl CuboidDrawable::CuboidDrawable(class CuboidShape,struct HandlerContainer *)" ([email protected]@[email protected]@@[email protected]@@Z) 
1>C:\Users\Riilu\Dropbox\Starfall\Code and shit\Starfall\x64\Debug\Starfall.exe : fatal error LNK1120: 2 unresolved externals 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
+1

您是否升級SFML庫VS2015?閱讀[這裏](http://www.sfml-dev.org/tutorials/2.0/start-vc.php) - **「你必須下載與你的Visual C++版本相匹配的軟件包......如果沒有爲您的Visual C++版本編譯的SFML包,您將不得不自己構建SFML「** – mvidelgauz

+0

哦,哈哈,我沒有意識到,對此抱歉。 – Riilu

+0

@mvidelgauz寫下這個回答不是評論:)。 – Lehu

回答

2

你也升級SFML庫VS2015? 「here - 」您必須下載與您的Visual C++版本相匹配的軟件包... 如果沒有針對您的Visual C++版本編譯的SFML軟件包,則必須自己構建SFML「