Linking error

  • majca
    18th May 2019 Member 0 Permalink

    Hello,

     

    First of all, thx for this nice piece of art :).

     

    I just pulled the code from the repository and followed this guide: https://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html.

     

    Sadly, I cannot build de solution because of some linking errors (copy/pasted bellow).

    I am using Visual Studio 2017.

     

    Any help would be appreciated :).

     

    Regards,

     

    Majca

     

     

    1>LuaSlider.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>LuaTextbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>Renderer.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>LegacyLuaAPI.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>LuaButton.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>LuaCheckbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator bool(void)const " (??BLuaSmartRef@@QBE_NXZ)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall BitmapBrush::BitmapBrush(class std::vector<unsigned char,class std::allocator<unsigned char> >,struct ui::Point)" (??0BitmapBrush@@QAE@V?$vector@EV?$allocator@E@std@@@std@@UPoint@ui@@@Z) referenced in function "public: __thiscall GameModel::GameModel(void)" (??0GameModel@@QAE@XZ)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall SandEffectOption::SandEffectOption(class GameModel *)" (??0SandEffectOption@@QAE@PAVGameModel@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall DrawGravOption::DrawGravOption(class GameModel *)" (??0DrawGravOption@@QAE@PAVGameModel@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall DecorationsOption::DecorationsOption(class GameModel *)" (??0DecorationsOption@@QAE@PAVGameModel@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall NGravityOption::NGravityOption(class GameModel *)" (??0NGravityOption@@QAE@PAVGameModel@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall AHeatOption::AHeatOption(class GameModel *)" (??0AHeatOption@@QAE@PAVGameModel@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall ConsoleShowOption::ConsoleShowOption(class GameModel *,class GameController *)" (??0ConsoleShowOption@@QAE@PAVGameModel@@PAVGameController@@@Z) referenced in function "public: void __thiscall GameModel::BuildQuickOptionMenu(class GameController *)" (?BuildQuickOptionMenu@GameModel@@QAEXPAVGameController@@@Z)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall Menu::Menu(char32_t,class String,int)" (??0Menu@@QAE@_UVString@@H@Z) referenced in function "public: void __thiscall GameModel::BuildMenus(void)" (?BuildMenus@GameModel@@QAEXXZ)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: void __thiscall Menu::AddTool(class Tool *)" (?AddTool@Menu@@QAEXPAVTool@@@Z) referenced in function "public: void __thiscall GameModel::BuildFavoritesMenu(void)" (?BuildFavoritesMenu@GameModel@@QAEXXZ)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: void __thiscall Menu::ClearTools(void)" (?ClearTools@Menu@@QAEXXZ) referenced in function "public: __thiscall GameModel::~GameModel(void)" (??1GameModel@@QAE@XZ)
    1>GameModel.obj : error LNK2019: unresolved external symbol "public: __thiscall DecorationTool::DecorationTool(class Renderer *,int,class String,class String,int,int,int,class ByteString)" (??0DecorationTool@@QAE@PAVRenderer@@HVString@@1HHHVByteString@@@Z) referenced in function "public: void __thiscall GameModel::BuildMenus(void)" (?BuildMenus@GameModel@@QAEXXZ)
    1>GameView.obj : error LNK2019: unresolved external symbol "public: class VideoBuffer * __thiscall DecorationTool::GetIcon(int,int,int)" (?GetIcon@DecorationTool@@QAEPAVVideoBuffer@@HHH@Z) referenced in function "public: void __thiscall GameView::NotifyToolListChanged(class GameModel *)" (?NotifyToolListChanged@GameView@@QAEXPAVGameModel@@@Z)
    1>LegacyLuaAPI.obj : error LNK2019: unresolved external symbol "public: void __thiscall LuaSmartRef::Assign(int)" (?Assign@LuaSmartRef@@QAEXH@Z) referenced in function "int __cdecl luatpt_element_func(struct lua_State *)" (?luatpt_element_func@@YAHPAUlua_State@@@Z)
    1>LuaComponent.obj : error LNK2001: unresolved external symbol "public: void __thiscall LuaSmartRef::Assign(int)" (?Assign@LuaSmartRef@@QAEXH@Z)
    1>LuaScriptInterface.obj : error LNK2001: unresolved external symbol "public: void __thiscall LuaSmartRef::Assign(int)" (?Assign@LuaSmartRef@@QAEXH@Z)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: void __thiscall LuaSmartRef::Assign(int)" (?Assign@LuaSmartRef@@QAEXH@Z)
    1>LegacyLuaAPI.obj : error LNK2019: unresolved external symbol "public: void __thiscall LuaSmartRef::Clear(void)" (?Clear@LuaSmartRef@@QAEXXZ) referenced in function "int __cdecl luatpt_element_func(struct lua_State *)" (?luatpt_element_func@@YAHPAUlua_State@@@Z)
    1>LuaScriptInterface.obj : error LNK2001: unresolved external symbol "public: void __thiscall LuaSmartRef::Clear(void)" (?Clear@LuaSmartRef@@QAEXXZ)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: void __thiscall LuaSmartRef::Clear(void)" (?Clear@LuaSmartRef@@QAEXXZ)
    1>LuaSlider.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaTextbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LegacyLuaAPI.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaButton.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaCheckbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaScriptInterface.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::operator int(void)const " (??BLuaSmartRef@@QBEHXZ)
    1>LuaTextbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaButton.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaCheckbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaScriptInterface.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaSlider.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::LuaSmartRef(struct lua_State *)" (??0LuaSmartRef@@QAE@PAUlua_State@@@Z)
    1>LuaTextbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)
    1>LuaWindow.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)
    1>LuaButton.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)
    1>LuaCheckbox.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)
    1>LuaScriptInterface.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)
    1>LuaSlider.obj : error LNK2001: unresolved external symbol "public: __thiscall LuaSmartRef::~LuaSmartRef(void)" (??1LuaSmartRef@@QAE@XZ)

    Edited once by majca. Last: 18th May 2019
  • jacob1
    19th May 2019 Developer 0 Permalink
    Try double clicking vsproject.py

    It should generate a new visual studio project. I haven't updated the guide yet to suggest this, because I haven't tested it yet, but people have told me it works perfectly.

    You could also add all the missing files manually, but there are probably a lot.
  • LBPHacker
    19th May 2019 Developer 0 Permalink

    And if you happen to want to add a new element, please try newelement.py too. It's also not documented and double-clicking it won't be enough as it needs an element name as an argument.

    Edited once by LBPHacker. Last: 19th May 2019
  • majca
    19th May 2019 Member 0 Permalink

    Working like a charm.

    Thanks!