gpt4 book ai didi

c++ - 从 Visual Studio 2013 转换到 Visual Studio 2015 的问题

转载 作者:行者123 更新时间:2023-11-27 22:53:26 28 4
gpt4 key购买 nike

我有一个庞大的 C++ 程序,到目前为止,我一直在使用 VS 2013 Express 进行处理。试用版结束,所以我决定转向 VS 2015 Professional。当我尝试编译和调试在 VS 2013 上完美运行的完全相同的代码时,我遇到了这些错误。我怎样才能使这项工作?

1main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RectangleShape::RectangleShape(class sf::RectangleShape &&)" (__imp_??0RectangleShape@sf@@QAE@$$QAV01@@Z) referenced in function "public: __thiscall entity::entity(class entity &&)" (??0entity@@QAE@$$QAV0@@Z)


1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::RectangleShape & __thiscall sf::RectangleShape::operator=(class sf::RectangleShape &&)" (__imp_??4RectangleShape@sf@@QAEAAV01@$$QAV01@@Z) referenced in function "public: class entity & __thiscall entity::operator=(class entity &&)" (??4entity@@QAEAAV0@$$QAV0@@Z)


1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(class sf::Sprite &&)" (__imp_??0Sprite@sf@@QAE@$$QAV01@@Z) referenced in function "public: __thiscall entity::entity(class entity &&)" (??0entity@@QAE@$$QAV0@@Z)


1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Sprite & __thiscall sf::Sprite::operator=(class sf::Sprite &&)" (__imp_??4Sprite@sf@@QAEAAV01@$$QAV01@@Z) referenced in function "public: class entity & __thiscall entity::operator=(class entity &&)" (??4entity@@QAEAAV0@$$QAV0@@Z)


1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Text::Text(class sf::Text &&)" (__imp_??0Text@sf@@QAE@$$QAV01@@Z) referenced in function "public: __thiscall entity::entity(class entity &&)" (??0entity@@QAE@$$QAV0@@Z)


1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::Text & __thiscall sf::Text::operator=(class sf::Text &&)" (__imp_??4Text@sf@@QAEAAV01@$$QAV01@@Z) referenced in function "public: class entity & __thiscall entity::operator=(class entity &&)" (??4entity@@QAEAAV0@$$QAV0@@Z)


1>C:\SFML-2.3.2\SFML\Debug\SFML.exe : fatal error LNK1120: 6 unresolved externals

最佳答案

SFML 似乎注释了一些类,以便将它们的所有成员都放入 DLL 中。但是,VS2015 现在生成移动构造函数和移动赋值运算符,而 VS2013 没有,而且库似乎没有正确处理这个问题。所有缺少的符号都是这些新函数。

具体来说,编译器似乎没有在客户端程序中生成实现,因为它希望它们存在于 DLL 中,但它们不存在于 DLL 中。您是否重新编译了 DLL,或者您使用的是用于 VS2013 的同一个 DLL?重复使用旧的可能会导致此错误。

关于c++ - 从 Visual Studio 2013 转换到 Visual Studio 2015 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35309449/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com