Compiling a "Windows Console" version

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fizzix
    Prophet
    • Aug 2009
    • 3025

    #31
    Originally posted by Dean Anderson
    So does that mean you've managed to get it to work now?

    In the Visual Stuido IDE, I compile it with:

    1) The compiler constant USE_WCN defined
    2) The compiler constant WINDOWS defined
    3) main-wcn.c included, but not any of the other main-xxx.c files

    I wouldn't know how to create a makefile to do that, though.
    I mean that I was able to compile the current version the old way, with Makefile.win and main-win.c . I was just verifying that the problems I was running into were dealing with the new compilation attempt and not something funky with the current version on git.

    Yeah, there needs to be a new Makefile, my cosmetic changes aren't going to cut it. That's where the problem is. Unfortunately, I don't know how to create that makefile though...

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #32
      Originally posted by fizzix
      Yeah, there needs to be a new Makefile, my cosmetic changes aren't going to cut it. That's where the problem is. Unfortunately, I don't know how to create that makefile though...
      IIRC there is a "create makefile" (or something) option in Visual Studio.
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Dean Anderson
        Adept
        • Nov 2009
        • 193

        #33
        Originally posted by Nick
        IIRC there is a "create makefile" (or something) option in Visual Studio.
        Not since 2005, unfortunately...

        So it looks like for the moment, we a set of patches and a file that can be used to build a native Windows Console version of Angband, but we need someone with the makefile-fu to be able to make them useful to people who aren't using Visual Studio.

        Comment

        • Magnate
          Angband Devteam member
          • May 2007
          • 5110

          #34
          Originally posted by Dean Anderson
          Not since 2005, unfortunately...

          So it looks like for the moment, we a set of patches and a file that can be used to build a native Windows Console version of Angband, but we need someone with the makefile-fu to be able to make them useful to people who aren't using Visual Studio.
          Well, this can't be impossible. I'm not a Makefile genius myself, but I know a lurker who is.
          "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

          Comment

          • Dean Anderson
            Adept
            • Nov 2009
            • 193

            #35
            Originally posted by fizzix
            tried compiling with the current nightly builds and your code and got the following error:

            undefined reference to `WinMain@16' in main.c

            In order to compile, a made a Makefile-wcn and changed main-win.o to main-wcn.o after applying the patches.

            edit: I'm attempting to compile on XP using MingW if that makes a difference.
            I've managed to reproduce this error in Visual Studio, by the way. It's not anything in the code. It's in the compiler settings.

            It's what you get if you tell it to compile the code into a Windows app rather than into a Console app.

            In Visual Studio that's decided when you create the project file. I haven't a clue how to make the distinction in a makefile though.

            Comment

            Working...
            😀
            😂
            🥰
            😘
            🤢
            😎
            😞
            😡
            👍
            👎