/ / Problemy z konwersją z Visual Studio 2013 do Visual Studio 2015 - c ++, visual-studio, visual-studio-2013, visual-studio-2015

Problemy z konwersją z Visual Studio 2013 do Visual Studio 2015 - c ++, visual-studio, visual-studio-2013, visual-studio-2015

Mam do tego ogromny program w C ++punkt Pracowałem nad użyciem VS 2013 Express. Wersja próbna zakończyła się, więc postanowiłem przejść do VS 2015 Professional. Kiedy próbuję skompilować i debugować ten sam dokładny kod, który działa idealnie na VS 2013, dostaję te błędy. Jak mogę to zrobić?

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.2SFMLDebugSFML.exe : fatal error LNK1120: 6 unresolved externals

Odpowiedzi:

4 dla odpowiedzi № 1

Wygląda na to, że SFML adnotuje niektóre klasy, aby wszystkieich członkowie są umieszczani w DLL. Jednak VS2015 generuje teraz konstruktory ruchów i operatory przypisania ruchów, których VS2013 nie zrobił, i wygląda na to, że biblioteka nie obsługuje tego poprawnie. Wszystkie brakujące symbole to te nowe funkcje.

W szczególności wygląda na to, że kompilator niegeneruje implementacje w programie klienckim, ponieważ spodziewał się, że będą one istnieć w DLL, ale nie istnieją w DLL. Czy ponownie skompilowałeś DLL, czy używasz tego samego, którego używałeś dla VS2013? Ponowne użycie starego może prowadzić do tego błędu.