Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install PhysicsFS ( on my Win 7 with MinGW. But I am having hard time doing it. I googled it as well but still nothing - I have used linux environment and make toolchain before ( not CMake though) - but I guess I am a bit rusty.

I tried following all the directions in INSTALL.txt and google - but here is what I managed till now.

I have MinGW installed and manully installed CMake as well. Now I download the src from the site and do "cmake -G "MinGW MakeFiles"

The next this is what bemused me - Well I havnt encountered it before - I do "make" and expect it to make the files but instead it goes into Windows Command Prompt. And then I am lost.

Any pointer please?

PART 2 -

I am fairly new MinGW - I was wondereing if I want to develop do I compile from source or just install the developing package - as I understand compiling from source would give me both ( dev packages as well as binaries/static libs), right? Please correct me if I am wrong.

share|improve this question

I recently needed to compile libRocket for MinGW and now I clearly see your problem. It is obvious; I was staring right at the beast and did not see it.

When working with CMake and MinGW you have tow options:

The Windows Way

In this case you can use cmakegui directly without restrictions. You select the folder to generate and select "Mingw Makefiles" as version. Don't forget to specify the make location. If you are invoking cmake from the command line (cmd.exe):

cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM="C:\MinGW\bin\mingw32-make.exe" ..\PhyisFS

This will create makefile for use with MinGW under cmd, not bash. It will create an install target that (if your project has one) that installs under C:\Program Files\.

The Unix Way

In this case you can not use cmakegui, since it will not find the prerequisite tools. (Maybe if you call cmakegui from MinGW's bash, it may work. But I have not tried.) In this case you create "Unix Makefiles", like so:

cmake -G "Unix Files" ../PhyisFS

This will create makefile for use under MinGW's bash. Any install target will install under "/usr/local" (or whatever you tell it with $prefix). This assumes a full "unix" environment and MSys provides it. So don't forget to install MSys and the MSys development tools.

share|improve this answer
I AM using MinGW. can I use cmakegui? I dont think so. – Amit Ahire Apr 30 '13 at 9:10
Why not? You are on Windows7, where you have a completely visual environment, why should you not use cmakegui? cmakegui will generate the makefiles and then you can call make from within cmd (or MSys). – rioki Apr 30 '13 at 11:20
OH! Yes I could use gui. Thanks. But wait I have some problem with the gui ( environmental variables) - Will get back to you after a while. – Amit Ahire Apr 30 '13 at 11:36
If the cmake's bin directory is in the path you can invoke cmakegui from the command line. For cmd that would be: SET PATH=%PATH%;c:\<cmakedir>\bin and on bash (MSys) PATH=$PATH;/c/<cmakedir>/bin Then you can use any predefined env variables. You may also write a small *.bat or *.sh script. – rioki Apr 30 '13 at 11:40
Thanks. I fixed all the variable ( have cygwin installed as well) and managed to get it to configure and generate the Makefile. But still I am confused as to - when I do make - Mingw shell changes into Cmd shell and I dont know where to go from there. (make or make install doesnt work in cmd shell)… – Amit Ahire May 1 '13 at 8:48
up vote 0 down vote accepted

I finally managed to get it installed. I will list out the things you need to do and proceed further.

As @rioki advised me - I used the cmake-gui to configure and generate the appropriate files.

First make sure that you are making the right kind of file. There are many options available. In my case I was trying to install PhysicsFS in MinGW and I had to learn the hard way that you should make files for MSYS file system.

enter image description here

And then use ( in my case I had different compilers) - Specify Native Compiler

enter image description here

Then when you finish. If there are any errors in the configuration process the cmake gui will help with it and you can use the gui to specify the path to correct location.

enter image description here

If everything is correct - (No red flags) - Then press "Generate"

enter image description here

Then you can go into the shell window and go ahead with the compilation process.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.