Skip to main content
Complete rewrite, the problem was obvious but hidden.
Source Link
rioki
  • 2.9k
  • 1
  • 24
  • 28

Have you used cmakegui? For me it really cuts down on most ofI recently needed to compile libRocket for MinGW and now I clearly see your problem. It is obvious; I was staring right at the confusion whenbeast and did not see it comes to configuring builds.

If you are usingWhen working with CMake and MinGW, you should use MSys, it solves many problems with cmd.have tow options:

The Windows Way

In this case you will create "Unix Makefile" or what ever that is called, because you have a fully functional bash environmentcan 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 (You still build native win32 binaries, unlike cygwincmd.exe):

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

One of the problem with binariesThis will create makefile for windows, is that they don't work welluse with mingw, especially C++ binaries. Unless someone provides specifically MinGW binaries you want to build any library from sourceunder cmd, not bash. It will create an install target that (Inif your project has one) that installs under C:\Program Files\.

The Unix Way

In this case you meantcan not use cmakegui, since it will not find the prerequisite tools. (Maybe if you should build MinGWcall cmakegui from sourceMinGW's bash, in thatit may work. But I have not tried.) In this case NOyou create "Unix Makefiles", the MinGW binaries are finelike 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.

Have you used cmakegui? For me it really cuts down on most of the confusion when it comes to configuring builds.

If you are using MinGW, you should use MSys, it solves many problems with cmd. In this case you will create "Unix Makefile" or what ever that is called, because you have a fully functional bash environment. (You still build native win32 binaries, unlike cygwin.)

One of the problem with binaries for windows, is that they don't work well with mingw, especially C++ binaries. Unless someone provides specifically MinGW binaries you want to build any library from source. (In case you meant if you should build MinGW from source, in that case NO, the MinGW binaries are fine.)

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.

Source Link
rioki
  • 2.9k
  • 1
  • 24
  • 28

Have you used cmakegui? For me it really cuts down on most of the confusion when it comes to configuring builds.

If you are using MinGW, you should use MSys, it solves many problems with cmd. In this case you will create "Unix Makefile" or what ever that is called, because you have a fully functional bash environment. (You still build native win32 binaries, unlike cygwin.)

One of the problem with binaries for windows, is that they don't work well with mingw, especially C++ binaries. Unless someone provides specifically MinGW binaries you want to build any library from source. (In case you meant if you should build MinGW from source, in that case NO, the MinGW binaries are fine.)