![]() |
|
problems installing Allegro 5 + cygwin on Windows 7 |
sean_von_drake
Member #15,485
February 2014
|
hi everybody, In order to install Allegro 5 I followed the readme instructions but without result. I downloaded and unpacked the Allegro 5 zip file (allegro-5.0.10.zip) in c:\cygwin\lib\allegro and then opened the cygwin console and do: cd /lib/allegro at firs, it seems that my cygwin is missing the X11 dev library: X11 not found. You may need to install X11 development libraries.
so I opened the cygwin setup and installed the package: libX11-devel and then issued again: cmake .. I noticed that cmake suggest to add this line at the beginning of CmakeLists.txt: set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required and so I've done; after this, tried again: X11 support currently requires OpenGL support. GAAAAA!!! re-open the cygwin setup and install: libglut-devel libGL-devel (the setup as usual handles the dependencies by himself). Wow, again: cmake .. and: X11 support requires Xcursor library. always by the cygwin setup now install: libXcursor-devel and xcursorgen X11 support requires Xcursor library.
wow guys now I really don't know what to do... any help will be greatly appreciated! |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Try deleting CMakeCache.txt and/or your build directory, and run cmake again. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
sean_von_drake
Member #15,485
February 2014
|
wow I feel a noob rm -rf * and I got: -- Allowing GCC to use SSE instructions -- Configuring incomplete, errors occurred! so I installed the package libGLU-devel and cmake again and... IT WORKS cmake runs without errors. So I try to compile a test program in my IDE (NetBeans): #include <cstdlib> using namespace std; int main(int argc, char** argv) { ALLEGRO_DISPLAY *display = NULL; if (!al_init()) { return 0; but when I do the "clean & build" action, the console output is: "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .clean-conf CLEAN SUCCESSFUL (total time: 1s) "/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf BUILD FAILED (exit value 2, total time: 5s)
maybe it's a linking problem? |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Yes, you need to link with the allegro libraries that you just created with Cmake. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
sean_von_drake
Member #15,485
February 2014
|
thank you again uhm in NetBeans I can specify additional paths for the linker from: and there I added "C:/cygwin/lib" (that contains the allegro5/ folder); I also added the same directory in this option fields: in case, I can also specify static library (*.a) files to be linked from: but I can't find any *.a file in the build directory (or subdirectories). with the same method I usually include and link the mysql client library that I use for db connection, and that works perfectly. I feel a noob again |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
sean_von_drake said:
uhm in NetBeans I can specify additional paths for the linker from: and there I added "C:/cygwin/lib" Yes, that is correct. Quote:
and there I added "C:/cygwin/lib" (that contains the allegro5/ folder); I also added the same directory in this option fields: No the directory you should add to those options is the include directory where you installed allegro to. I think that was working already, because you compiled a simple test program including <allegro5/allegro.h>. Quote:
in case, I can also specify static library (*.a) files to be linked from: but I can't find any *.a file in the build directory (or subdirectories). The *.a archive files should be in the c:/cygwin/lib folder, and you want to specify each allegro library that you are using in your code. The Cmake build for allegro also comes with a -DWANT_MONOLITH=On|Off option so that you can build a single monolithic dll to link against (instead of linking to several or more libraries singly). The dlls will be found in the bin folder, and they go alongside your executable. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
sean_von_drake
Member #15,485
February 2014
|
Edgar Reynaldo said: The *.a archive files should be in the c:/cygwin/lib folder, and you want to specify each allegro library that you are using in your code. so, this may be the problem... I can't find anywhere the *.a files; it is possible that the cmake command did not generate them? should I try to run cmake again? or can I download the *.a files? |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
cmake doesn't create the libraries by itself, you need to run make, and make install to finish the installation. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
sean_von_drake
Member #15,485
February 2014
|
great, thank you I issued make && make install and it worked!!! after the command is done, I added in: the libraries I need (in the example above, only liballegro.dll.a) and the clean & build from the IDE was successful! thanks to you, your help was really great I hope the Allegro community will have my new game soon have a nice day and many thanks again!!!
|
|