From: Sisyphus <sis...@op...> - 2010-06-06 05:56:52
|
----- Original Message ----- From: "Alan W. Irwin" <ir...@be...> >> C:\_32\comp\plplot-5.9.5\buildmingw>cmake -G "MinGW >> Makefiles" -DCMAKE_INSTALL_PREFIX=install .. >> CMake Error: CMake was unable to find a build program corresponding to >> "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to >> select a different build tool. > > I have never experienced this error (CMAKE_MAKE_PROGRAM is not set), but I > am virtually positive it simply means it cannot find make.exe on your > PATH. > I notice that there is a make programme normally available as part of > MinGW. > Do you have that downloaded, installed, and on your PATH? Duh ! It's actually 'mingw32-make.exe' that I need .... and I didn't have it installed - even though it was going to be needed to run the very next command. Sorry, I'm used to building libraries with MinGW by running configure and make in the MSYS shell. MSYS, of course, has its own make utility, so I haven't had any need for mingw32-make until now. Some of my MinGW installations do have mingw32-make installed, but not the installation I was using (of which I was unaware). Having installed mingw32-make, I then decided to try first for static libs (which I generally prefer), so I ran: cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=install -DBUILD_SHARED_LIBS=OFF .. There's some messages in the output about various libraries not being found, and other things. I'll have to go back and have a closer look at them. Runnning 'mingw32-make' and 'mingw32-make install' worked fine. I then tried a re-build, adding the '-DBUILD_TEST=ON' option. The c and c++ examples built ok (and the ones I've tried work fine), but there's a linking problem with the f77 examples that kills the show: [snip] [ 69%] Built target f77_examples Linking Fortran executable x01f.exe \home\rob\mingw_vista\i686-pc-mingw32\lib/libmingw32.a(main.o):main.c:(.text+0x1 04): undefined reference to `WinMain@16' collect2: ld returned 1 exit status mingw32-make[2]: *** [examples/f77/x01f.exe] Error 1 mingw32-make[1]: *** [examples/f77/CMakeFiles/x01f.dir/all] Error 2 mingw32-make: *** [all] Error 2 > If you don't want to use MinGW make, then there are other CMake generators > available for your platform corresponding to lots of different build > tools. > Run "cmake --help" to get a full list. > > "MSYS Makefiles" is one of those Windows generators I am beginning to gain > experience with under Wine (a windows workalike available under Linux and > Mac OS X). That requires a large fraction of MSYS to be downloaded and > installed including make and bash. But if I recall previous discussion > correctly, the "MinGW Makefiles" generator you tried to use (which I plan > to > try out under Wine fairly shortly) involves just make from MinGW (_not_ > MSYS) without bash or other MSYS requirements. That simplicity is quite a > selling point for it which I presume is why that generator has been > recommended on our Wiki. However, I like the wider availability of more > tools with the MSYS environment which is why I tried "MSYS Makefiles" > (with > the additional package installs from MSYS that implies) before "MinGW > Makefiles". I'm not greatly fussed as to which I use - and I'll probably experiment with both. I'll also have to make sure that I can build dynamic libs ok, that the MinGW ports of gcc-4.x.x also work (I was using gcc-3.4.5), and I'll be interested to see how things go when I try using a 64-bit build of MinGW. So, maybe expect some more mail from me on this list in the near future :-) Thanks for the reply. Cheers, Rob |