Thread: Allegro...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    17

    Question Allegro...

    Alright... Windstream doesn't let me restore my Internet connection after resets when on Linux, so I'm back on Windows and would like to give Allegro a go. I have the 5.0.2-1-mingw-5.6.0 zip file containing bin/include/lib folders and I have no idea where to put them on Windows 7 64bit (using the corresponding mingw version, of course). I'm becoming a pain, but I can't see another issue like this happening.

    I just spent awhile googling like crazy and can't find any official explanations of where to put the files/folders or what I might have to add to codeblocks, if anything.

    There are plenty of good Allegro tutorials, so that won't be a problem, but I just need to know where these go. Thanks, and I won't need this kind of assistance again. @_@;

  2. #2
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    Assuming you have a pre-built version (given that there is a bin folder), just dump the contents of the zip file somewhere, then add the lib folder to your linker search path (-L flag), and the include folder to your compiler include path (-I flag). Then link to the library (-l flag) as usual. When you run your exec, just don't forget to point your PATH to the bin folder, or alternatively make sure you have the compiled library in the same directory as your exec.

    Either that, or read the INSTALL file.
    iMalc: Your compiler doesn't accept misspellings and bad syntax, so why should we?
    justin777: I have no idea what you are talking about sorry, I use a laptop and there is no ascii eject or something

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    Well, I added C:\Allegro\bin to the PATH variable, but I'm not really sure what the linker search path is (or how to edit it) or how to add the include folder to the compiler's include path. I'm totally clueless now and searching isn't being particularly helpful. How would I go about this on Windows 7? @_@;

    EDIT: If it helps to find an answer, at all, I'm using Codeblocks for my IDE.
    Last edited by Abstracticus; 05-23-2011 at 04:30 PM. Reason: Additional info

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Well this is code blocks on Linux, but the dialogs should be pretty similar on windows.
    Allegro...-screenshot-jpg
    1. Locate the project build options
    2a. On the search directories tab, set the path(s) to the library files (Eg: c:\allegro\lib) for the linker.
    2b. On the search directories tab, set the path(s) to the header files (Eg: c:\allegro\include) for the compiler.
    3. On the linker settings tab, add the names of the libraries you want to link with (Eg. liballegro.a) (or perhaps it would be just allegro)
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    Well, I'm now stuck at step three:
    3. On the linker settings tab, add the names of the libraries you want to link with (Eg. liballegro.a) (or perhaps it would be just allegro)
    Neither version of what was said here works for me. @_@; I tried liballegro.a and allegro, but neither worked. @_@;

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    That probably means you didn't do step 2 properly. Make sure if you go to <whatever you put in step 2b> that you see a library, either a .a or a .lib or a .dll.

  7. #7
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    Hmm... There aren't any of those file extensions in the include folder, which is just as I extracted it.
    -lib has all the .a files
    -bin has all the .dll files
    -include has all the header files
    Currently, under search directories, C:\Allegro\lib is under 'linker' and C:\Allegro\include is under compiler and I'm guessing, now, that I'll have to add each individual .a file or something to the link libraries, won't I? This is far more frustrating for me on Windows than how SDL would've set itself up under Linux, but I guess I shouldn't expect these little conveniences on Windows.
    I gather that I've done something tremendously wrong, but what could it be?

  8. #8
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    If you want static linking, you can use the .a; dynamic linking would be the .dll, but I forget if there's something else you have to do there so that Windows can find them at runtime.

    What actual problem are you seeing?

  9. #9
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    The exact message is:
    "fatal error: allegro.h: No such file or directory"
    and I'm including it as "#include <allegro.h>" which is probably wrong anyway.

  10. #10
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    I suppose you can try "allegro.h" -- I don't remember right now whether it matters. If you've put the include directory in the "Compiler" thing under include directories you should be ok.

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > "fatal error: allegro.h: No such file or directory"
    Well this means you got the compiler include path wrong.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  12. #12
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    Maybe I should just give up... @_@ Thanks for all the attempts at helping, but I think I'm a lost cause this time, and I'm sorry for wasting anyone's time.

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    FYI: The MinGW GCC that ships with Code::Blocks Nightly Builds is a TDM Build NOT an official MinGW GCC Build.
    The directions/DLL/Libraries are likely for the standard MinGW GCC; using non-standard TDM builds with the pre-built binaries are not likely to work correctly.

    Tim S.

  14. #14
    Registered User
    Join Date
    Oct 2010
    Posts
    17
    I installed MinGW from a separate download on the site itself, I'd never install it on Windows otherwise.

  15. #15
    Registered User
    Join Date
    Oct 2006
    Posts
    250
    If you post a screenshot with your current settings, we might be able to help you out further.
    iMalc: Your compiler doesn't accept misspellings and bad syntax, so why should we?
    justin777: I have no idea what you are talking about sorry, I use a laptop and there is no ascii eject or something

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allegro Help.
    By tetraflare in forum Game Programming
    Replies: 1
    Last Post: 12-07-2002, 11:35 PM
  2. Allegro
    By drdroid in forum C++ Programming
    Replies: 13
    Last Post: 09-12-2002, 01:35 PM
  3. allegro
    By funkydude9 in forum C++ Programming
    Replies: 7
    Last Post: 06-16-2002, 05:39 PM
  4. using allegro
    By Leeman_s in forum Game Programming
    Replies: 1
    Last Post: 04-18-2002, 01:02 PM
  5. allegro 5.0
    By muttski in forum Game Programming
    Replies: 6
    Last Post: 04-05-2002, 10:52 PM

Tags for this Thread