zlib?

  • jacob1
    18th Oct 2012 Developer 0 Permalink
    outside of the src/ folder is includes/, not inside

    and I also wonder why lua is labelled "cat"
  • cyberdragon442
    18th Oct 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    18th Oct 2012 Developer 0 Permalink
    @cyberdragon442 (View Post)
    there's a story behind it (I think someone thought BGLA was bagels?), but I wasn't here when that happened.

    And you are doing it wrong, don't touch the cat folder, leave it like it is (except to delete what you added). Go back to before the src folder, and there you will find an includes folder in the same directory as src. But you don't need to do anything here either, reread the wiki, find the step I talked about, and add the two lines I said to the list, just like you added "includes" to the list.
  • cyberdragon442
    18th Oct 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    18th Oct 2012 Developer 0 Permalink
    Ok, you must be doing it wrong, but I guess it's fine for now. I'll give you a link to the generated files, you can only make them with generator.py, and you can only run that with scons..., but I made some that will work until new elements are added

    Edit: Get the generated files, which you need to compile, here: https://github.com/jacob1/PowderToypp/downloads
  • abczyx123987
    18th Oct 2012 Member 0 Permalink
    There has to be something you're doing wrong.
    I just managed to get TPT++ compiled on Visual Studio (though it took a little while to sort out a few little errors).

    Starting from scratch and following the wiki (which explains how to do it for the old version of TPT), this is what I had to do differently from the wiki:
    • Obviously, you need the generated files. (see jacob1's post above, or run the generator.py script as described here)
    • You'll also need dirent.h (put it right in your "Includes" folder), which you can download from here (you only need dirent.h, nothing else from that zip file).
    • Include directories: besides what's in the wiki, I also needed to add:
      $(ProjectDir)Includes\lua5.1
      $(ProjectDir)Includes\SDL
      $(ProjectDir)src
      $(ProjectDir)data
      Also add the folder where you put the generated files.
    • Preprocessor definitions: I added this to the list, along with what's in the wiki (the last two might not be needed, but still):
      WIN
      USE_SDL
      USE_STDINT
      It might also be a good idea to define the version numbers and release/beta preprocessor definitions here as well.
    • Input libraries: You'll need to add the zlib library along with the others (see my post earlier in this thread).
    • Remove file.c and test.c from the project (right-click the files in the Solution Explorer and click "Exclude from project").
    • In DMG.cpp (line 70 in my copy of the source code), find
      dist = sqrt(pow(nxi, 2)+pow(nxj, 2));and change it to
      dist = sqrt(pow((float)nxi, 2)+pow((float)nxj, 2));.
      Also, a few lines below that, find
      angle = atan2(nxj, nxi);and change it to
      angle = atan2((float)nxj, nxi);.

    If you did everything else in the wiki correctly, you shouldn't have had to do anything else (i.e. any other weird source code modifications or downloading headers/libraries off the internet).
    And just to make sure, when you extract the libraries download in the wiki, it should be extracted into the very top-level directory of the source code (the one above the "src" folder), next to where the project files should be.
  • boxmein
    18th Oct 2012 Former Staff 0 Permalink
    @abczyx123987 (View Post)
    I also have a working project set up.
  • jacob1
    18th Oct 2012 Developer 0 Permalink
    @abczyx123987 (View Post)
    good. That basically describes what I did to compile it, except I think I just never added file.c and test.c to the solution when they were originally created, and I fixed those last errors already.

    You do need USE_SDL, or else main won't be defined. I don't use USE_STDINT, but maybe it does something.

    And I tried doing what jacksonmj said before, and it didn't work. Does that even work on windows? I was trying it from inside of visual studio though (pre-build events), so maybe that's why.


    I think he said he was using code::blocks though
  • cyberdragon442
    18th Oct 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    18th Oct 2012 Developer 0 Permalink
    @cyberdragon442 (View Post)
    are you using the libraries from the wiki/official source? Or the ones from the internet. Don't use the ones from the internet, use the real lua.h and other lua headers. Also, try putting them in the right spot (includes folder or maybe just called include folder), not in src/cat