Build errors...

  • TRS
    29th Dec 2015 Member 1 Permalink

    I followed the instructions on

    https://powdertoy.co.uk/Wiki/W/Compiling_tpt%2B%2B_with_Visual_studio.html

    , but I always get the same error(s):

     

    1>c:\users\administrator\desktop\TPT++\src\simulation\Elements.h(57): fatal error C1083: Cannot open include file: 'ElementClasses.h': No such file or directory
    1>  OptionsView.cpp

     


    ...and this for EVERY source file of TPT++.

     

    I checked the path at the settings, moved some files, did everything again for a few times, tried another way, but no success.

     

    Did anyone had the same errors? If yes, how did you solve them? Please comment, I would really appreciate that.

     

    LG,

    TRS

  • jacob1
    29th Dec 2015 Developer 0 Permalink
    Are you using the premade project? (this one: https://dl.dropboxusercontent.com/u/43784416/PowderToy/vs%202013%20project.zip). I just updated it 4 days ago.

    Anyway, you need to run generator.py. It's a bit annoying but there is no other way to create ElementClasses.h at the moment. To run it, you need to install either python 2 or python 3, then double click on generator.py
  • Grillbox
    30th Dec 2015 Member 0 Permalink

    Hello,

     

    Im also trying to build TPT++. But I get like 200+ the same error: timespec: struct type redefinition > pthread.h

     

    Can anybody help me to fix this?

  • jacob1
    30th Dec 2015 Developer 0 Permalink
    @Grillbox (View Post)
    Are you also using visual studio? Which version?

    Or are you using MinGW + scons? Or are you not even on windows?

    I need more information ... like what platform and compiler you are using.
  • Grillbox
    30th Dec 2015 Member 0 Permalink

    @jacob1 (View Post)

     

    Sorry, I was looking trough the topics and I found the solution... But now im getting A linker error.

     

    unresolved external symbol_imp__iob_func referenced in function_Showerror,  I think its something with sdl

     

    Im using visual studio 2015, on windows 7

    Edited 2 times by Grillbox. Last: 30th Dec 2015
  • jacob1
    30th Dec 2015 Developer 0 Permalink
    @Grillbox (View Post)
    Weird. I looked it up and found some possible things that could cause it.

    I might try recompiling all the non-static libraries. I recompiled all the static ones so that everything would work properly without warnings, but the non static ones I left the same. Try doing a Static build though, that might fix it for now (although static builds take longer)

    Edit: or try and do this somewhere: http://stackoverflow.com/questions/30450042/unresolved-external-symbol-imp-iob-func-referenced-in-function-openssldie

    Edit2: I compiled new import libraries for everything, i'll upload them tomorrow though. It might also fix your problem (and if it doesn't ... well at least it will fix a compiler warning :P)
    Edited 2 times by jacob1. Last: 30th Dec 2015
  • TRS
    30th Dec 2015 Member 0 Permalink

    @jacob1

    Yes, I used the premade project, but I didn´t knew about the thing with generator.py, thanks.

    Now i´ve tried it again with generator.py, and the errors from before are gone, but now it can´t open the include files ?

     

    Error 1 error C1083: Cannot open include file: 'pthread.h': No such file or directory c:\users\administrator\desktop\TPT++\src\tasks\Task.h 5 1 The-Powder-Toy++

     

    Error 204 error C1083: Cannot open include file: 'lua5.2/lua.h': No such file or directory c:\users\administrator\desktop\TPT++\src\lua\LuaCompat.h 14 1 The-Powder-Toy++

     


    ... again, this for 272 times.

     

    Seems like Visual Studio simply ignores the includes folder.

     

     

    I´m using Visual Studio 2013 on Windows 10 x64.

     

     

  • jacob2
    30th Dec 2015 Member 0 Permalink
    @TRS (View Post)
    Did you download the required libraries? The includes folder comes with it. Download https://dl.dropbox.com/u/43784416/PowderToy/Required%20Libraries.zip and extract everything to the correct place ...
  • TRS
    30th Dec 2015 Member 0 Permalink

    *Facepalm*

     

    Thanks, but now I found out where the error was... Why didn´t I notice that I extracted the libs into the source folder? Why did I do that?

     

    Well, sorry for wasting your time... have an Oreo!

     


           _.:::::._
         .:::'_|_':::.
        /::' --|-- '::\
       |:" .---"---. ':|
       |:( O R E O ):|
       |:: `-------'::|
        \:::.......::: /
         ':::::::::::'
            `'"""'`

  • Omega29
    31st Dec 2015 Member 0 Permalink

         _.:::::._
         .:::'_|_':::.
        /::' --|-- '::\
       |:" .---"---. ':|
       |:( O R E O ):|
       |:: `-------'::|
        \:::.......::: /
         ':::::::::::'
            `'"""'`

     

    Congratulations for solving the problom! Have an oreo!