SFML不再有效

时间:2016-07-07 15:33:50

标签: c++ linker dependencies sfml

完成重新格式化并从Visual Studio 2012升级到2015后,我的程序将无法编译并向我发送链接器错误。我已经查看了路径,链接器和诸如此类的东西,它看起来就像它应该工作一样,我在引用的类中也查看了我的代码,但它们都设置了正确的包含和名称空间。< / p>

在重新格式化之前,所有文件(包括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 &&)" (__imp_??4RectangleShape@sf@@QEAAAEAV01@$$QEAV01@@Z) referenced in function "public: __cdecl AnimatedSprite::AnimatedSprite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,struct HandlerContainer *)" (??0AnimatedSprite@@QEAA@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAUHandlerContainer@@@Z)
1>DynamicSprite.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __cdecl sf::RectangleShape::operator=(class sf::RectangleShape &&)" (__imp_??4RectangleShape@sf@@QEAAAEAV01@$$QEAV01@@Z)
1>CuboidDrawable.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::ConvexShape & __cdecl sf::ConvexShape::operator=(class sf::ConvexShape &&)" (__imp_??4ConvexShape@sf@@QEAAAEAV01@$$QEAV01@@Z) referenced in function "public: __cdecl CuboidDrawable::CuboidDrawable(class CuboidShape,struct HandlerContainer *)" (??0CuboidDrawable@@QEAA@VCuboidShape@@PEAUHandlerContainer@@@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 个答案:

答案 0 :(得分:2)

您是否也将SFML库升级到VS2015?阅读here - &#34;您必须下载与您的Visual C ++版本匹配的软件包。 ... 如果没有为您的Visual C ++版本编译SFML包,则必须自己构建SFML&#34;