Compiling problems...

  • Nobody905
    31st Aug 2013 Member 0 Permalink

    So, I have no idea how to compile my mod. (I'm new to modding tpt)

    I use Visual Studio 2012 on Windows 8 Pro x64.

    I tried making new project from existing code, selected it, changed the options as the compiling wiki tutorial said.

    Build.

    200+ errors, all are the same:

    ****.h not found blah blah blah.

    So, it can't find the header files. I checked, and, indeed, they are not there.

    I didn't screw things up at all, just added 2 new elements as .cpp files.

     

    Any help?

  • MiningMarsh
    31st Aug 2013 Member 0 Permalink

    Can you paste the errors?

     

    My immediate thought is that you are not running generator.py to generate the element headers. Not sure how the devs are doing this on windows.

    Edited once by MiningMarsh. Last: 22nd Sep 2013
  • Nobody905
    31st Aug 2013 Member 0 Permalink

    @MiningMarsh (View Post)

    It's pretty useless to paste the errors, there were missing .h files.

    And I did run generator.py, with Python.

  • MiningMarsh
    31st Aug 2013 Member 0 Permalink

    @Nobody905 (View Post)

     Still would help to know the exact set of missing files.

     

    Just running the generator.py doesn't look like it would work:

    cat SConscript| grep generator
    AddOption('--python-ver',dest="pythonver",default=False,help="Python version to use for generator.py")
    # detect the executable name for python so we can run some generator scripts
    # run generator commands
    env.Command(['generated/ElementClasses.cpp', 'generated/ElementClasses.h'], Glob('src/simulation/elements/*.cpp'), pythonVer + " generator.py elements $TARGETS $SOURCES")
    env.Command(['generated/ToolClasses.cpp', 'generated/ToolClasses.h'], Glob('src/simulation/tools/*.cpp'), pythonVer + " generator.py tools $TARGETS $SOURCES")

    Notice that it provides the source files and targets to the generator script, so I assume without those it will fail to build the headers.

    Edited once by MiningMarsh. Last: 31st Aug 2013
  • jacob2
    31st Aug 2013 Member 0 Permalink
    One of the steps asks you to add src/ as an includes folder. Make sure you have added everything in the list, if you miss one it won't find any .h files in a folder.

    Also if this doesn't work then yes post the errors to pastebin.com, I recognize all the common errors. All the .h files are there if you have the source, it just doesn't know which to compile.
  • Nobody905
    2nd Sep 2013 Member 0 Permalink

    I did every step exactly as the compiling tutorial says.

    I can't give you the errors, I deleted the file.

  • jacob1
    2nd Sep 2013 Developer 2 Permalink
    can you try to compile and then post the errors again? I can't really help until I see the errors and know what is wrong.
  • mniip
    2nd Sep 2013 Developer 0 Permalink
    @Nobody905 (View Post)
    first of all before starting modding, you have to make sure you can compile unmodified version of TPT, it's written in bold in the wiki
  • Nobody905
    2nd Sep 2013 Member 0 Permalink

    @jacob1 (View Post)

     I'll compile again. What I'd actually prefer is to make my elements in Lua code, is there any way to set low/high temp element transitions (Like WAX) in Lua?

    @mniip (View Post)

     I'll check next time. The missing files were all default files that remained untouched actually.

  • mniip
    2nd Sep 2013 Developer 0 Permalink
    @Nobody905 (View Post)
    indeed there is
    (EDIT: despite being considered experienced with lua stuff, i actually have very little knowledge of the elements API, i prefer making real scripts with UI and stuff which can be used as a tool, not just some silly element making)
    Edited once by mniip. Last: 2nd Sep 2013