I am somewhat clueless, but not completely???
I am trying to setup Allegro 4.4.0.1 for use with the NetBeans 6.8 IDE utilizing the MinGW compilers on a Windows XP machine. I can compile and run regular C++ programs so I think the NetBeans and MinGW part of the equation is working properly. I had previously used Allegro on VC with precompiled binaries[?] but I guess I need to compile it on my own for use with MinGW which I have never done before.
I am using CMake 2.8.0, and when I try to configure I get the following messages:
----------------------------------------------------------------------------------
The C compiler identification is GNU
The CXX compiler identification is GNU
Check for working C compiler: C:/MinGW/bin/gcc.exe
CMake Error: Generator: execution of make failed. Make command was: /MinGW\ Makefiles "cmTryCompileExec/fast"
Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
The C compiler "C:/MinGW/bin/gcc.exe" is not able to compile a simple test
program.
It fails with the following output:
Change Dir: C:/MinGW/CMakeFiles/CMakeTmp
Run Build Command:/MinGW\ Makefiles "cmTryCompileExec/fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: /MinGW\ Makefiles
"cmTryCompileExec/fast"
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:46 (project)
Configuring incomplete, errors occurred!
------------------------------------------------------------------------------
For "Where is the source code:" I have "C:/MinGW/allegro" and for "Where to build the binaries:" I have "C:/MinGW".
I notice that the value for CMAKE_SH is CMAKE_SH-NOTFOUND
Any help is much appreciated:-*
Reading through CMakeFiles/CMakeError.log should reveal the problem, otherwise you can attach it here.
Don't worry about sh not being found.
Determining if the C compiler works failed with the following output:
Change Dir: C:/MinGW/CMakeFiles/CMakeTmp
Run Build Command:/MinGW\ Makefiles "cmTryCompileExec/fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: /MinGW\ Makefiles "cmTryCompileExec/fast"
EDIT: strange I can edit my post but not post a reply to it.
Anyway I found someone else with what looks like the same problem who found a solution but I do not understand how to implement the solution.
From: http://www.mail-archive.com/cmake@cmake.org/msg13859.html
Sattler seems to give the solution here: http://www.mail-archive.com/cmake@cmake.org/msg13871.html
And the original poster says it works here: http://www.mail-archive.com/cmake@cmake.org/msg13930.html
but I do not understand what he did/changed to fix the problem. I have the PATH set in my environment settings but I do not know how to set the LIB and INCLUDE.
I don't see how those threads are related to your problem. Nonetheless you can set LIB and INCLUDE in the same way you set PATH, either on the command line or in the control panel thingy by adding new variables.
The problem would be a lot clearer if you posted the CMakeFiles/CMakeError.log.
I did. This is all that is in the CMakeError.log:
Determining if the C compiler works failed with the following output:
Change Dir: C:/MinGW/CMakeFiles/CMakeTmp
Run Build Command:/MinGW\ Makefiles "cmTryCompileExec/fast"
The system cannot find the file specified
Generator: execution of make failed. Make command was: /MinGW\ Makefiles "cmTryCompileExec/fast"
Do you have 'make' installed? It may be named 'mingw32-make' instead.
Where it says:
Determining if the system is big endian passed with the following output: Change Dir: C:/MinGW/CMakeFiles/CMakeTmp
that directory should be within the Allegro directory, NOT in the MinGW directory.
Where it says:
Run Build Command:/MinGW\ Makefiles "cmTryCompileExec/fast" The system cannot find the file specified Generator: execution of make failed. Make command was: /MinGW\ Makefiles "cmTryCompileExec/fast"
that should say something like:
Run Build Command:c:/MinGW/bin/make.exe "cmTryCompileExec/fast"
Ok, making progress now;D
I redid everything having C:\allegro separate from C:\MinGW instead of inside it and managed to get much further along, but still something missing. When I configure I get:
"
Guessed MinGW directory: C:/MinGW
Could NOT find ZLIB (missing: ZLIB_LIBRARIES ZLIB_INCLUDE_DIRS)
Could NOT find PNG (missing: PNG_LIBRARY PNG_PNG_INCLUDE_DIR)
Could NOT find VORBIS (missing: OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
Configuring done
"
I have no idea what any of that stuff is. I thought I DLed all of the right stuff.
allegro-4.4.0.1.zip is what I made C:\allegro from, while C:\MinGW is made from 15 different archives:
binutils-2.20-1-mingw32-bin.tar.gz
gcc-c++-4.4.0-mingw32-bin.tar.gz
gcc-c++-4.4.0-mingw32-dll.tar.gz
gcc-core-4.4.0-mingw32-bin.tar.gz
gcc-core-4.4.0-mingw32-dll.tar.gz
gdb-7.0.50.20100202-mingw32-bin.tar.gz
gmp-4.2.4-mingw32-dll.tar.gz
libiconv-1.13-mingw32-dll-2.tar.gz
make-3.81-20090914-mingw32-bin.tar.gz
mingwrt-3.17-mingw32-dev.tar.gz
mingwrt-3.17-mingw32-dll.tar.gz
mpfr-2.4.1-mingw32-dll.tar.gz
pthreads-w32-2.8.0-mingw32-dll.tar.gz
w32api-3.14-mingw32-dev.tar.gz
dx80_mgw.zip
So what am I missing? Or maybe I put something in the wrong place?
So what am I missing? Or maybe I put something in the wrong place?
You're missing some OPTIONAL dependencies. zlib, png, and vorbis.
It just means you won't be able to use .png images, or play back .ogg vorbis audio with allegro.
There must be some next step that I am missing? I did the generate and it says "generating done" but I don't have any alleg44.dll
Don't I need that for the Linker libraries? And there is an allegro.h in C:\allegro\include which I added to C:\MinGW\include but for some reason NetBeans IDE can't find it there when I have #include <allegro.h>
I really appreciate the help guys; I know I have gotten it to work by using precompiled binaries I got from allegro-4.4.0-mingw-bin.zip, but I am really trying to figure out how to do it myself.
EDIT: I am using C:/allegro for the source code when I configure and generate and I have tried using C:/allegro and also C:/MinGW for where to build the binaries and neither seems to generate the results I get from extracting allegro-4.4.0-mingw-bin.zip
Did you run 'make'?
I cannot find a 'make' to run. No 'mingw32-make' and no 'make-mingw32' either.
After some searching it looks like this is a tool separate from CMake?
Let me see if I have this right; CMake is used to make a makefile and then make is run on that makefile?
EDIT: OK I downloaded the mingw32-make installer and installed it.
I now have C:\MinGW\bin mingw32-make.exe, but when I run it the console flashes and that is about it.
EDIT2: w00t I moved mingw32-make into C:\MinGW and ran it and now it is going to work!
I now have C:\MinGW\bin mingw32-make.exe, but when I run it the console flashes and that is about it.
EDIT2: w00t I moved mingw32-make into C:\MinGW and ran it and now it is going to work!
Are you running mingw32-make by double-clicking it? It's intended to be run form the command-line, so it should be in the mingw\bin directory, as that directory was added to the PATH environment variable.
Yes, I double clicked on it after moving it and it seemed to work. I got a test program to work as well.
Right now I am looking to find the allegro static library so that I don't need to include the alleg44.dll
Yes, I double clicked on it after moving it and it seemed to work.
Thats the wrong thing. You should follow the instructions given.