|
|
| Error with CodeBlock 8.02 and allegro 4.2.2 |
|
dfighter
Member #12,495
January 2011
|
Hello, I firstly followed that steps: But when i have to do this : "Now allegro can be compiled by typing in the command line: Quote: FIX.BAT mingw The Fix.bat works, but then, the error is Quote: makefile.all:248: *** recipe commences before first target. stop. So i searched on this forum, and i found this topic: In wich i saw that solution : I uninstalled CodeBlock, Mingw, Allegro, did it step by step carefully, the problem remains, i did it again reading all the topic, redoing a few times, but the error still remains. I think my PATH is good. I tried a few directories to install mingw and allegro. The problem seems to be with MinGW (just in my opinion), but i really don't see how to fix it. I really hope you can help me, i need allegro for a university project. PS : I'm sorry for my english but it's not my first language =P |
|
Matthew Leverton
Supreme Loser
January 1999
|
A few people have complained about that error message, but I've never seen anybody reply with a resolution other than to download the binaries or try version 4.4. You can get a binary from here. I would guess that your version of mingw32-make is broken or not compatible with the 4.2 makefiles. |
|
dfighter
Member #12,495
January 2011
|
I all uninstalled, re-followed the first steps i send (on wiki allegro), taking the binaries you send (i just unzipped it in an "allegro" directory at the root, is that ok? Failed with the binaries? edit : i took a 5.1.3 version of MinGW |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
dfighter said: Failed with the binaries? Once you have the binaries, you no longer need to build Allegro with mingw32-make, it's been done for you. dfighter said: edit : i took a 5.1.3 version of MinGW Which version of Allegro do you want to work with? Allegro 4 or Allegro 5? dfighter said: i just unzipped it in an "allegro" directory at the root, is that ok? It is if you set the compiler and linker search directories in Code::Blocks, either for your project, or the global search directories. Generally though, you will want to copy allegro.h and the include/allegro folder to your <MINGW_DIR>/include folder. After that, copy the *.a files to your <MINGW_DIR>/lib folder, and copy the *.dll files to your <WINDOWS>/System32 folder or include them with your completed project. Edit :
MINGW_DIR
include
allegro
allegro.h
lib
*.a
WINDOWS
System32
*.dll
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 |
|
Matthew Leverton
Supreme Loser
January 1999
|
I wouldn't copy Allegro DLLs around like that. They aren't necessarily compatible with each other. The Allegro DLL should just go in with the same folder as your program. You can safely put them in your MINGW_DIR/bin folder and make sure it's in the PATH when running your program during development. |
|
Evert
Member #794
November 2000
|
So, did anyone ever look at line 248 of makefile.all? |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Evert said: So, did anyone ever look at line 248 of makefile.all? We don't know which version of Allegro he used. dfighter, which version of Allegro did you originally try to build? 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 |
|
Evert
Member #794
November 2000
|
Edgar Reynaldo said: We don't know which version of Allegro he used. I had assumed that "allegro 4.2.2" in the thread title referred to the version number he was using. |
|
dfighter
Member #12,495
January 2011
|
Hello, Thank you for your answers. I think I found a part of the problem. I downloaded an older version of MinGW and re-try the first instructions i followed ( http://wiki.allegro.cc/index.php?title=Code::Blocks ) But Codeblock doesn't find the routines itself. There is an "allegro" directory in the "include" directory of Allegro with a lot of .h . Should i use this? [ I mean : C: / Allegro / include / allegro +.h files (those i copied) / .h files + other directories ] It doesn't work yet, but I think this problem is easier than the previous though... x) edit : Maybe problems with .a files too, because there is no .a in C:\allegro\lib\mingw32.... Edit 2 : I took a look to the result of the compilation of allegro, it seems there is errors, finally... So, should I install directly binnary files? If yes, which one, in which directory? I really don't understand..... |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Evert said: I had assumed that "allegro 4.2.2" in the thread title referred to the version number he was using. I didn't notice that for some reason or other. Whoops. Line 248 of makefile.all : 235# -------- rules for deleting the generated files --------
236
237clean:
238ifdef UNIX_TOOLS
239 -rm $(RM_OPTS) $(OBJ_CLEAN_FILES)
240 -rm $(RM_OPTS) $(OTHER_CLEAN_FILES)
241else
242 define RM_CLEAN
243 $(foreach file, $(wildcard $(OBJ_CLEAN_FILES)), -del $(subst /,\,$(file))
244 )
245 $(foreach file, $(wildcard $(OTHER_CLEAN_FILES)), -del $(subst /,\,$(file))
246 )
247 endef
248 -$(RM_CLEAN)
249endif
Gnu Error Messages said:
‘recipe commences before first target. Stop.’ The second form is generated if the line has a semicolon as the first non-whitespace character; make interprets this to mean you left out the "target: prerequisite" section of a rule. See Rule Syntax. I'm not really a makefile expert. I don't know what is wrong with it. Maybe someone else knows why make doesn't think -$(RM_CLEAN) is a legal directive. dfighter said: The compilation of allegro seems to work, but when i launch a program, CodeBlock doesn't find allegro.h. All right, I copy all the .h files of allegro in the "include" directory of MinGW. But Codeblock doesn't find the routines itself. There is an "allegro" directory in the "include" directory of Allegro with a lot of .h . Should i use this? The make install command takes care of copying the files for you. dfighter said: So, should I install directly binnary files? If yes, which one, in which directory? If you're still getting errors compiling Allegro, yes I would recommend using a binary package. To see where to put the respective files, see my earlier post. 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 |
|
Evert
Member #794
November 2000
|
I would start by printing the value of $RM_CLEAN, followed by moving its definition outside of the target. |
|
dfighter
Member #12,495
January 2011
|
Hi, Thank you for spending time to help me! I downloaded a binary at this address : http://www.allegro.cc/files/?v=4.2 I took the "Allegro library pre-built for MinGW" (v 4.2.3) I suppose I am wrong because it doesn't work either, but I don't understand why ^^" I didn't find any "make install" command |
|
torhu
Member #2,727
September 2002
|
Sounds about right, what error messages do you get? |
|
dfighter
Member #12,495
January 2011
|
Hi, The program can find the allegro.h file, but can't run the routines, here is a screen : http://img513.imageshack.us/i/allegerr.jpg Errors mean "reference/address (?) undefined to "install_keyboard" (for example) |
|
torhu
Member #2,727
September 2002
|
You have to tell it to link with the Allegro library, probably liballeg.a or something. |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
You can find the linker options in Code Blocks by selecting 'Project -> Build Options'. Then select the release version of your project in the top left and click on linker settings. Under 'other linker options' add -lalleg. Likewise, for the debug version of your project, add -lalld to other linker options. You can also change your global settings by going to the menu 'Settings -> Compiler and debugger' and changing the link options there. 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 |
|
dfighter
Member #12,495
January 2011
|
It works!! Thank you everyone, really, I would have not did it without you, thank you very much! |
|
|