installing and setting up Allegro

This is a discussion on installing and setting up Allegro within the Game Programming forums, part of the General Programming Boards category; I am still trying to install and setup Allegro where it will work. I will try to give a very ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    31

    installing and setting up Allegro

    I am still trying to install and setup Allegro where it will work. I will try to give a very detailed explanation of what is going on. Lets hope it all helps.

    Compiler: Dev-C++ v. 4.9.8.0
    OS: Windows XP

    I found this website that tells how to install Allegro for Dev-C++. After all of the basic downloading and such, it says:

    Windows NT, 2000, XP - Open Control Panel (in XP, use the 'Classic View'), then the "System" applet, then the "Advanced" tab, and finally the "Environment" button. Select the PATH= entry, and add "C:\Dev-Cpp\bin" to it (without the quotes, and assuming you installed Dev-C++ in C:\Dev-Cpp). Create a new environment variable called MINGDIR and set it equal to "C:\Dev-Cpp" (again, without the quotes). You will need to log off and log back in for the changes to take effect..

    There is one of the problems. I went to the system>Advanced>Environment variables(the only environment button there). I chose to edit Path and when it came up the value that it says to set to "C:\Dev-Cpp\bin says:

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System


    So does the above directions mean to delete that and add the "C:\Dev-Cpp\bin" or just add it on to the end of the above ^ value i just posted? I have no clue. Hopefully someone can tell me.



    Another problems is the next step is to open a DOS prompt. Click Start. Choose Run and type "command.com" for Windows 95/98 or "cmd.exe" for Windows NT/2K/ME/XP. You can create a shortcut to it on your desktop or start menu if you like. Find your way to wherever you installed Allegro. Now's the time to test your installation. Type "gcc -v" (without the quotes) at the command prompt, followed by the <enter> key. You should see something like this:

    G:\Dev-Cpp\allegro>gcc -v
    Reading specs from g:/dev-cpp/bin/../lib/gcc-lib/mingw32/2.95.3-6/specs
    gcc version 2.95.3-6 (mingw special)


    I went to the run and I typed cmd.exe and a little window popped up saying "C:\Documents and Settings\Temp" but I didn't know how to navigate to where I installed Allegro which is "C:\Dev-Cpp\Allegro". I typed that in and it said something along the lines of "'C:\Dev-Cpp\Allegro' is not recognized as an internal or external command, operable program or batch file." So another things is can someone help me there?


    Thats all for now... Thanks for any help you can offer



    P.S.- If someone can tell me what they use for graphics and where I can get it and whether or not it is this much of a pain in the butt to install or not, It would help alot.
    Last edited by Emotions; 12-29-2004 at 11:03 PM.

  2. #2
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    >%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\S y stem32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System

    add it like this

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy stem32\Wbem;C:\Program Files\Common Files\Adaptec Shared\System; C:\Dev-Cpp\bin


    to get to where you installed it type cd G:\Dev-Cpp\allegro or whatever
    change directory is cd

    you can just do cd.. to go to the parent then cd something to get to something in the parent folder

    hope this helps
    Hmm

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    31
    Helped a little. I added it like you said and made the other that the tutorial stated. I went and changed directories like you said and went back to the place it said to type cmd.exe at the first of the tutorial and typed in "gcc -v" and before I set it up like that and changed the directory I got some popup saying it wouldn't work for some reason or another. After I set it up like you said and changed directory, when I typed in "gcc -v" a black pop-up window came up did something and left. Kinda like the hello world when you don't know to pause the system. So I figure it worked there. The next step is to

    6)At the DOS prompt you were in from step 5, type fix mingw32, then type make and watch Allegro compile. This may take a few minutes. Once Allegro is compiled, you'll need to install it.

    7)Now, to installing Allegro: type make install at the command prompt. Note that some poeple seem to have trouble at this step. Make sure your MINGDIR has been set. You can manually do it by typing SET MINGDIR=C:\Dev-Cpp before running make install.



    So I am stuck once again at number 6. When it says the DOS prompt does it mean where I typed in 'cmd.exe' (run from the start menu) or where I changed directories or something else? I went and typed it in where I typed in cmd.exe and I got a popup box saying "Windows cannot find 'fix'. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search." I went and typed it in where I changed directory and it said "'fix' is not recognized as an internal or external command, operable program or batch file." So can you next please help me through that? Sorry for so many questions..

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    go the the run box and type cmd.exe
    that will give you the "DOS prompt" then type fix mingw32 and whetever else
    if you just type it in the run box it will flash open and close as you said it did before.

    ok...if 'fix' isnt working then either you need to be in the allegro/bin folder OR you havent set up your environment variables properly

  5. #5
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,810
    Or you could do it the easy way
    http://devpaks.org/show.php?devpak=2
    Woop?

  6. #6
    Registered User
    Join Date
    Dec 2004
    Posts
    31
    I'm lost again. I went back I believe I have the enviroment variables set right. I add to the path exactly as B0bDole enter it. I created the MINGDIR and set the value to exactly what it said. Next was to go and run the 'gcc -v'. I went back to run and typed in cmd.exe and then when the command prompt came up I changed directories to C:\Dev-Cpp\Allegro which is where I installed Allegro. So now I have

    'C:\Dev-Cpp\Allegro>' at the very left side of the screen asking me to input something else.

    So I entered in 'gcc -v' and got the answer "'gcc' is not recognized as an internal or external command, operable program or batch file." So that way didn't work. Next I entered in >(added that to the C:\Dev-Cpp\Allegro>)gcc -v. This time it said "'-v' is not recognized as an internal or external command, operable program or batch file." So I entered it as C:\Dev-Cpp\Allegro>>gcc-v(without the space from the c to the hypen) and I got "the syntax of the command is incorrect." I'm lost how should I enter it and if I am entering it in right what is wrong and why is it not working? I entered in many times these three ways:

    C:\Dev-Cpp\Allegro>gcc -v
    C:\Dev-Cpp\Allegro>>gcc -v
    C:\Dev-Cpp\Allegro>>gcc-v


    Do I need to update my MingW or what? Thanks for the time and help.

  7. #7
    Registered User
    Join Date
    Dec 2004
    Posts
    31
    Going to try it your way prog-bman. Downloading it now. I hope it works because what is going on now is just a pain.

  8. #8
    Registered User
    Join Date
    Dec 2004
    Posts
    31
    Well I tried it by downloading that and it said it was installed. I went to my package manager and it was there, so I hope it is working. Now to find out how to use it.


    Thanks all..



    *edit*- I found a website with some source code and tutorials etc. I went to new>project>multimedia tab>allegro application.. I cleared the code and add in:

    Code:
    #include <allegro.h>
    
    int main()
    {
        int done = FALSE;
        allegro_init();
        install_keyboard();
    
        set_color_depth( 16 );
        if ( set_gfx_mode( GFX_AUTODETECT , 640 , 480 , 0 , 0 ) < 0 )
        {
            set_color_depth( 15 );
            if ( set_gfx_mode( GFX_AUTODETECT , 640 , 480 , 0 , 0 ) < 0 )
            {
                allegro_message( "Unable initialize graphics module\n % s\n" ,
                                 allegro_error );
                return  - 1;
            }
        }
    
        acquire_screen();
        textout( screen , font , "Hello World" , 100 , 100 ,
                 makecol( 255 , 255 , 255 ) );
        release_screen();
    
        while ( !done )
        {
            if ( key[ KEY_ESC ] ) done = TRUE;
        }
    
        return 0;
    }
    END_OF_MAIN();

    When it compiled and ran my whole screen went black and somewhere near the top left of the screen(not exactly top left) the works hello world appeared. So I am guessing that is what that code there is supposed to do right? Also can I still go to New>projects>console application and create code and use allegro in the console application?


    Thanks again for all of the help..
    Last edited by Emotions; 12-30-2004 at 01:40 AM.

  9. #9
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,810
    To create an allegro project your going to do what you did with the multimedia tab. And yes that is what that program is supposed to do.
    Check you private messages also
    Woop?

  10. #10
    ---
    Join Date
    May 2004
    Posts
    1,379
    I know you got it working, but just to get it off my chest.

    >>C:\Dev-Cpp\Allegro>gcc -v

    the gcc.exe is in the Dev-Cpp\bin folder possibly even in the allegro/bin (not sure) so i may have misguided you.

  11. #11
    Registered User
    Join Date
    Dec 2004
    Posts
    31
    Does anyone know of some good and easy to understand tutorials for learning Allegro? If you could post the website address it would be very helpful. Thanks...

  12. #12
    Registered User Mokkan's Avatar
    Join Date
    Oct 2003
    Posts
    20

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem in Dev-C++ installing
    By kapil1089thekin in forum C Programming
    Replies: 1
    Last Post: 03-14-2009, 05:21 PM
  2. Setting up a Unix box
    By @nthony in forum Tech Board
    Replies: 6
    Last Post: 07-22-2007, 11:22 PM
  3. Help me setting c++ gtkmm glade on vista
    By eHobayyeb in forum Tech Board
    Replies: 8
    Last Post: 06-27-2007, 01:02 PM
  4. Problems installing GTKmm
    By LiKWiD in forum C++ Programming
    Replies: 6
    Last Post: 03-29-2004, 11:31 PM
  5. Installing Linux
    By Unregistered in forum Linux Programming
    Replies: 11
    Last Post: 05-14-2002, 12:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21