Build error

  • BlueScreen
    27th Sep 2015 Member 0 Permalink

    I'm trying to compile the base game before editing, and getting the following linker errors:

    http://pastebin.com/jxsVaWrG

     

    I've searched the forums for linker errors and have found many posts but none with these errors.

     

    I'm using Visual Studio 2013 on Windows 7, I've downloaded the latest source and followed the wiki instructions. I'm using the pre-made project.

     

    Since all the unresolved externals are members of a 'Platform' class, I assume whatever library includes this class is missing? I have downloaded the required libraries linked in the wiki article, and run generator.py before building.

     

    What library is missing? A full list of all dependencies would also help, so I can check if something's not there.

  • jacob1
    27th Sep 2015 Developer 0 Permalink
    I was going to upload a new project a week ago, but I decided it might be a better idea to wait and redo the project file (and hopefully fix static building entirely).

    For now, add src/Platform.cpp to the solution. I think in the Solution Explorer you can just right click somewhere and go to Add -> Existing file, and then you can add both Platform.cpp and Platform.h.
  • BlueScreen
    27th Sep 2015 Member 0 Permalink

    That fixed it, thanks. Still getting another error, though:

    1>ElementClasses.obj : error LNK2019: unresolved external symbol "public: __thiscall Element_CRMC::Element_CRMC(void)" (??0Element_CRMC@@QAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)
    1>ElementClasses.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Element_CRMC::~Element_CRMC(void)" (??1Element_CRMC@@UAE@XZ) referenced in function "class std::vector<class Element,class std::allocator<class Element> > __cdecl GetElements(void)" (?GetElements@@YA?AV?$vector@VElement@@V?$allocator@VElement@@@std@@@std@@XZ)

     

    CRMC doesn't seem to exist as an element, but it is referenced in Simulation.cpp and BREC.cpp (BREL element).

    Edited once by BlueScreen. Last: 27th Sep 2015
  • jacob1
    27th Sep 2015 Developer 0 Permalink
    OK, Add src/simulation/elements/CRMC.cpp now. Forgot about that one ..

    You might have to run generator.py too, just double click it (assuming you installed python)
  • BlueScreen
    27th Sep 2015 Member 0 Permalink

    Ah, missing element :/

    Oddly enough, generator.py had found CRMC somehow and added it to the ElementClasses files.

     

    It's compiled now. Thanks!