Making things work on Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Therem Harth
    Knight
    • Jan 2008
    • 926

    Making things work on Windows

    I normally use some kind of GNU/Linux because it works better for me than anything else. However, I do have Windows 7 installed on one of my computers, and among other things, I'd like to use it for some variant development.

    The problem is, nothing wants to compile!
    - I have trouble getting CMake (both Windows and Cygwin versions) to notice the presence of GCC
    - For compiling the GTK2 interface, CMake doesn't detect GTK2 even if the libraries are installed and in my PATH

    Furthermore the whole business is just overcomplicated. On Linux I can do everything from one terminal: git pull, cmake, make, and I'm done. On Windows I either have to fire up a (bloated, confusing) IDE, or I've got two or three different types of terminals... Or I can add everything to my PATH and risk incompatibilities.

    Is there a One IDE to Rule Them All that would make my life easier? How do you guys handle this? How does anyone compile stuff on Windows that needs CMake?
  • AnonymousHero
    Veteran
    • Jun 2007
    • 1393

    #2
    Which GCC are you using?

    Comment

    • ghengiz
      Adept
      • Nov 2011
      • 178

      #3
      Originally posted by Therem Harth
      The problem is, nothing wants to compile!
      - I have trouble getting CMake (both Windows and Cygwin versions) to notice the presence of GCC
      - For compiling the GTK2 interface, CMake doesn't detect GTK2 even if the libraries are installed and in my PATH

      Furthermore the whole business is just overcomplicated. On Linux I can do everything from one terminal: git pull, cmake, make, and I'm done. On Windows I either have to fire up a (bloated, confusing) IDE, or I've got two or three different types of terminals... Or I can add everything to my PATH and risk incompatibilities.
      first, are you sure gcc is in your path? try to launch it from a terminal.

      second, the order in the env variables could be important, because, as you know, programs and libraries are searched in the order given there, and the first version found is used. probably in the readme's there is some indication...

      third, you don't really need to set paths in stone, it is enough to write a batch file, so the default values are not touched. In it, put just the exports for the new values of path and any other env variable of interest. You can then experiment freely, without harm your system, simply launching the said batch file. If things go really bad, you can simply restart, and here you are, a clean system again!

      things being overcomplicated is the price to be paid to work in windows

      edit: the IDE you are looking for, you already know. It's linux
      Last edited by ghengiz; February 4, 2012, 17:26.

      Comment

      • Therem Harth
        Knight
        • Jan 2008
        • 926

        #4
        Originally posted by AnonymousHero
        Which GCC are you using?
        Umm... The one used to compile msysgit, which is probably pretty recent (4.x).

        Comment

        • AnonymousHero
          Veteran
          • Jun 2007
          • 1393

          #5
          Originally posted by Therem Harth
          Umm... The one used to compile msysgit, which is probably pretty recent (4.x).
          I ask because (AFAIK) there are two different GCC compilers on Windows, namely the Cygwin GCC and the MinGW GCC. Since you mentioned msys/msysgit, I take it that it's MinGW GCC you're using...?

          EDIT: But as ghengiz mentioned, you probably just don't have GCC on your path. I believe you can also specify the full path by using a switch to the CMake invocation.

          Also, according to my ToME 2.x "fork" README.txt, it should be possible to compile using:

          Code:
                 $ cmake -G "MinGW Makefiles"
                 $ mingw32-make

          Comment

          • Therem Harth
            Knight
            • Jan 2008
            • 926

            #6
            Yeah, it's MinGW.

            I tried the following BTW:

            - Add MinGW to PATH
            - Run CMake to generate a makefile
            - Open an msysgit terminal (i.e. git bash), cd to the relevant directory, and run make

            ... make just prints

            Code:
            Microsoft Windows [Version 6.1.7601]
            Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
            and kills bash, exiting to the normal Windows command shell. Running it again continues to print that message, and do nothing else.

            (I've also tried Cygwin and its version of MinGW, for cross-compiling to a native Windows application. In that case Cygwin's CMake can't find Cygwin's MinGW, or even Cygwin's normal GCC.)

            Comment

            • Therem Harth
              Knight
              • Jan 2008
              • 926

              #7
              OMG I'm an idiot. It was mingw32-make, like you said. *facepalm*

              Thank you very, very much.

              Edit: BTW is there any way to give the CMake GUI a (permanent) fix on the MinGW executables without adding them to the PATH?
              Last edited by Therem Harth; February 4, 2012, 18:25.

              Comment

              • AnonymousHero
                Veteran
                • Jun 2007
                • 1393

                #8
                EDIT: Nvm. I see you already figured it out.

                No idea about the CMake GUI, though. I'm way too comfortable in Linux-land to ever use Windows .

                Comment

                • Therem Harth
                  Knight
                  • Jan 2008
                  • 926

                  #9
                  I would avoid Windows, but I'm trying to learn more about Windows Vista/7 administration and internals for various (mostly job-related) reasons. In the process I figured I would see if I could do something about the bugs that haunt T2 on Windows.

                  (Also been thinking about using the GTK2 interface as the main cross-platform one. OTOH GTK2 is going to be entirely obsolete soon. Hurray.)

                  Edit: BTW I am pretty happy with Win7 (aside from the absurd bloat). That said, any OS that does not have chroot (or reasonable equivalent) built in really does not deserve to be used on ~90% of desktops.
                  Last edited by Therem Harth; February 4, 2012, 23:04.

                  Comment

                  • nppangband
                    NPPAngband Maintainer
                    • Dec 2008
                    • 926

                    #10
                    Originally posted by Therem Harth
                    Yeah, it's MinGW.

                    I tried the following BTW:

                    - Add MinGW to PATH
                    - Run CMake to generate a makefile
                    - Open an msysgit terminal (i.e. git bash), cd to the relevant directory, and run make

                    ... make just prints
                    There already a windows makefile in the source (makefile.win), so you shouldn't have to make one. So step 2 above (CMAKE) is unnecessary.

                    Once you have minGW installed and added to PATH, all you should have to do is open a terminal, navigate to the *Angband/src sub directory, and enter: "make -f makefile.win MINGW=YES".
                    NPPAngband current home page: http://nppangband.bitshepherd.net/
                    Source code repository:
                    https://github.com/nppangband/NPPAngband_QT
                    Downloads:
                    https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                    Comment

                    • Therem Harth
                      Knight
                      • Jan 2008
                      • 926

                      #11
                      Mmm? I thought AnonymousHero's version of T2 didn't use the Makefile.* any more, only CMake?

                      Comment

                      • nppangband
                        NPPAngband Maintainer
                        • Dec 2008
                        • 926

                        #12
                        I missed the T2 part. I thought you were talking about Angband. (translation: I assumed you were talking about Angband without reading because I didn't read the thread carefully enough )
                        NPPAngband current home page: http://nppangband.bitshepherd.net/
                        Source code repository:
                        https://github.com/nppangband/NPPAngband_QT
                        Downloads:
                        https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

                        Comment

                        • zaimoni
                          Knight
                          • Apr 2007
                          • 590

                          #13
                          Originally posted by Therem Harth
                          Yeah, it's MinGW.

                          I tried the following BTW:

                          - Add MinGW to PATH
                          - Run CMake to generate a makefile
                          - Open an msysgit terminal (i.e. git bash), cd to the relevant directory, and run make

                          ... make just prints

                          Code:
                          Microsoft Windows [Version 6.1.7601]
                          Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
                          and kills bash, exiting to the normal Windows command shell. Running it again continues to print that message, and do nothing else.
                          The lead developer of CMake, Bill Hoffman, explicitly refused my offer to patch CMake 2.6 to handle MingW32 + MingW32 bash. (The officially supported check for MingW32 bails if it sees bash in the path.) It's an intentionally broken configuration. The fix is moderately easy (a "trust me" configuration).

                          There is a standoff between the CMake dev team and the CygWin dev team over what CMake on CygWin should define. As near as I could follow the flamewar on the CMake mailing list between the head developers, CygWin intentionally broke backward compatibility of CygWin and expected CMake to match CygWin; this was explicitly refused.
                          Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
                          Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
                          Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

                          Comment

                          • Therem Harth
                            Knight
                            • Jan 2008
                            • 926

                            #14
                            The clashes of giant egos... IOW, why Microsoft is still eating everyone's lunch.

                            Comment

                            • Magnate
                              Angband Devteam member
                              • May 2007
                              • 5110

                              #15
                              Originally posted by Therem Harth
                              The clashes of giant egos... IOW, why Microsoft is still eating everyone's lunch.
                              +1. I find these kind of disputes really upsetting, especially when it's so clear that neither solution is technically superior to the other, they're just a matter of preference. The inability to be objective about what's best in the long run is really sad.

                              Did Bill Hoffman say why he wanted Cmake + mingw32 + mingw32-bash to be intentionally broken? The reasoning isn't obvious.
                              "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

                              Comment

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