Error during linking

  • gandy93
    27th Nov 2011 Member 0 Permalink
    I'm trying to compile TPT from the official git repositary (my HEAD is 769b26e 2011-11-17). I'm going by the wiki tutorial and am using Code::Blocks 10.05. I've done everything what's in the tutorial. It compiles well enough but fails at linking. Here is the build log http://pastebin.com/5qBPrcBR. I think it's connected to SDL Bug 974 -- http://goo.gl/HLiqi. The verson of SDL I have is SDL-devel-1.2.14-mingw32. Any ideas what to do?
  • TheWiseEyes
    27th Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • tommig
    27th Nov 2011 Member 0 Permalink

    Visual studio...

    More user friendly, and easier to learn

  • abczyx123987
    27th Nov 2011 Member 0 Permalink
    The Code::Blocks tutorial is a bit out of date...
    ...I always just compile from the command line using the Makefile that comes with the source.
  • jacksonmj
    27th Nov 2011 Developer 0 Permalink
    What is the exact order of the libraries in "Project -> Build options -> Linker settings"?
    gcc is sometimes a bit fussy about the order in which it links libraries, try swapping the positions of SDL and SDLmain.

    If it still doesn't work, try using the Makefile that comes with the source ("make powder-sse3.exe").
  • gandy93
    27th Nov 2011 Member 0 Permalink
    Thanks, jacksonmj! I reordered the libraries in the same order as they are in the tutorial (before they were randomly) and it works. Thanks!

    PS: I tried VSC++ 2010 and Makefile but both failed. VS had some problems with luaconsole.c and make with md5.c.
  • jacksonmj
    27th Nov 2011 Developer 0 Permalink
    I'll look at the makefile problem next time I have access to Windows (probably in about two weeks time) - but it might help me reproduce the problem if you pastebin the errors you got.

    This commit should fix luaconsole.c for Visual Studio (haven't tested it yet, VS is a bit of a pain to get working under Wine): https://github.com/jacksonmj/The-Powder-Toy/commit/3f89ee36ca3377a909ab3e7099dd36a4ed0f41ed



    (Also, the togglable zoom you suggested a while ago has been added - Alt+Z)
  • gandy93
    27th Nov 2011 Member 0 Permalink
    Here is what make said: http://pastebin.com/C7GyHY3L. And yes, now I know that the togglable zoom is implemented. I've discovered it in the source a few minutes ago. *hides in shame* Somehow I missed it in the changelog...