Thread: Allegro!?

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    Question Allegro!?

    I have recently downloaded the latest Allegro library. I am lost. There are so many files and it seems to just be source code or something. I tried running an example program and got the error of no such file Allegro.h! Plus it has all these undeclared functions becuase of the missing Allegro file. What should I do!?

    Edit: I have fixed the problem with the missing file - but now it has many missing files that are IN Alegro.h and I dont know what to do! I dont want to copy all the files into my directory!
    Last edited by CammoDude91; 07-27-2003 at 07:12 PM.

  2. #2
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Have you properly installed Allegro by running the makefile and such? Also, if you have are you linking to Allegro properly inside your compiler (i.e. #include <allegro.h>)? For more help you can go to allegro.cc

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    Go the the folder called docs (it should be in the allegro folder), then browse through and select the file that has the same name as your compiler (ie MSVC). The instructions are in there.
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Posts
    27
    Originally posted by funkydude9
    Go the the folder called docs (it should be in the allegro folder), then browse through and select the file that has the same name as your compiler (ie MSVC). The instructions are in there.
    It does not have Dev-C++.
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  5. #5
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Posts
    1,020
    Look at this txt file:

    C:\Dev-Cpp\Allegro\docs\build\mingw32.txt

  6. #6
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    Angry NOOO!!!

    I got so far and now I am here:

    7) You now need to add 'C:\Dev-Cpp\bin' to the *beginning* of your PATH.

    If you use Windows 9x you can add the line
    'path c:\Dev-Cpp\bin;%PATH%' to the end of your 'c:\autoexec.bat'
    file. You can use 'edit', 'msconfig', 'sysedit', 'notepad' or any
    other editor capable of editing ASCII text.

    If you use Windows ME, you'll need to run 'msconfig', then select the
    'Environment' tab, and add 'c:\Dev-Cpp\bin' to PATH.

    If you use Windows NT (which includes 2000 and XP) then open
    Control Panel, and click the 'System' applet, then the 'Advanced' tab,
    and finally the 'Environment' button. Select the PATH= entry, and add
    'c:\Dev-Cpp\bin' to it.

    8) Likewise add the line 'set MINGDIR=C:\Dev-Cpp' to your
    'c:\autoexec.bat'.
    however I am on XP!!! I do not have dos - only CMD and there is no autoexec.bat in any folder... as i see!
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  7. #7
    new h4xx0rz term

    RTFMMC - Read the fricken (censored) manual more carefully

  8. #8
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    RTFMMC - Read the fricken (censored) manual more carefully
    Oooh...I'll have to remember that one
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

  9. #9
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    Wink lol,

    thx u guys... thats funny.

    Ok, so this makes me feel REALLY stupid. it tells me to add that line in 8 to autoexec.bat - which i cant find... but after 7 if i type gcc -v in cmd alot of system and compiler information appears - much more then whats in the example... am i done?

    EDIT: o guess not. i created a notepad file with this:
    Code:
       #include <stdio.h>
    
       int main(int argc, char **argv)
       {
          printf ("Hello\n");
          return (0);
       }
    and then saved it in my Dev-C++/Cpp directory as hello.c.
    then i ran cmd and typed in:
    Code:
    gcc -c hello.c
    just to get a no file existing error.
    I got the same error for a C++ program!
    I tried to compile it with:
    Code:
    g++ -c hello.cpp
    nothing works.
    Last edited by CammoDude91; 07-29-2003 at 07:13 AM.
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  10. #10
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    I think i got it!

    i compile:
    Code:
    C-Shell | cd C:\Dev-cpp
    C-Shell | gcc hello.c
    
    hello.c:1:23: iostream: No such file or directory
    hello.c: In function `main':
    hello.c:4: parse error before ':' token
    hello.c:7:1: warning: no newline at end of file
    (my prompt is "C-Shell $ $B $")
    so now i get REAL errors... but this is my source file:
    Code:
       #include <iostream>
       int main(int argc, char **argv)
       {
         cout << "Hello" << endl;
         return (0);
       }
    the prob is that it is missing the IOstream header - is this in a certian folder? i will look for it now.
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  11. #11
    Registered User
    Join Date
    Jul 2003
    Posts
    27
    CMD session:
    Code:
    C:\Documents and Settings\Cameron>cd C:\Dev-Cpp
    C:\Dev-Cpp>gcc hello.c
    hello.c:1:23: iostream: No such file or directory
    hello.c:2: parse error before "namespace"
    hello.c:2: warning: data definition has no type or storage class
    hello.c: In function `main':
    hello.c:5: `cout' undeclared (first use in this function)
    hello.c:5: (Each undeclared identifier is reported only once
    hello.c:5: for each function it appears in.)
    hello.c:5: `endl' undeclared (first use in this function)
    whats wrong? sry to put u to so much trouble!

    edit, i used this now:
    Code:
    C:\Dev-Cpp>g++ -c hello.cpp
    hello.cpp:7:1: warning: no newline at end of file
    what kind of error is that? how do i fix it?

    edit again, i used this now:
    Code:
    C:\Dev-Cpp>g++ -c hello.c
    C:\Dev-Cpp>
    i guess it worked.... so where in the world is my exe?
    Last edited by CammoDude91; 07-29-2003 at 11:49 AM.
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  12. #12
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    IIIITTTT WWWOOOOORRKKSKSKKSS!!!

    YES!!! thank u all soooo much! i have Allegro and i can compile and all!! thxthxthx!
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

  13. #13
    Registered User
    Join Date
    Jul 2003
    Posts
    27

    well that ........es me off!

    i just remembered that i did all this so i could use Allegro. Now i can compile my games through command line. but i still cant use Allegro! it cant find any functions and i cant find any of the files that contain them - most importnatly Allegro.h!
    **infected by frenchfry164
    **
    I am a signature virus. Please add me to your signature so that I may multiply

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Allegro in C for a newb
    By Ideius in forum C Programming
    Replies: 5
    Last Post: 12-29-2005, 04:36 PM
  2. Game Programming FAQ
    By TechWins in forum Game Programming
    Replies: 5
    Last Post: 09-29-2004, 02:00 AM
  3. double buffering for allegro
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 09-12-2002, 02:45 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-20-2002, 11:35 PM
  5. Allegro programming in a window
    By Person Man in forum Windows Programming
    Replies: 0
    Last Post: 11-16-2001, 03:23 PM