Thread: allegro help

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    34

    allegro help

    i just installed allegro and went to use the first tutorial on loomsoft.net http://loomsoft.net/alltut_lesson1.shtm

    but when i go to compile i get this error (i included the alleg.lib)

    --------------------Configuration: lesson1 - Win32 Debug--------------------
    Linking...
    LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
    Debug/lesson1.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.

    lesson1.exe - 2 error(s), 0 warning(s)
    Compiler: MSVC++ 6.0

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Do you have a main function?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    34
    yes i did exactly what it said in the tutorial here is the source

    Code:
    #include <iostream>
    #include <conio.h>
    #include <allegro.h>
    using namespace std;
    
    int main(int argc, char *argv[]) 
    {
    	allegro_init();
    	install_keyboard();
    	set_gfx_mode(GFX_AUTODETECT, 640,480,0,0); 
    	readkey();
    	return(0);
    }
    end_of_main();
    Compiler: MSVC++ 6.0

  4. #4
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    END_OF_MAIN not end_of_main

  5. #5
    Registered User
    Join Date
    Sep 2002
    Posts
    34
    thanks but now i have a different error
    [qoute]
    --------------------Configuration: Cpp2 - Win32 Debug--------------------
    Compiling...
    Cpp2.cpp
    c:\program files\microsoft visual studio\vc98\include\allegro\platform\aldjgpp.h(20) : fatal error C1083: Cannot open include file: 'pc.h': No such file or directory
    Error executing cl.exe.

    Cpp2.obj - 1 error(s), 0 warning(s)
    [/qoute]

    any idea of what is wrong?
    Compiler: MSVC++ 6.0

  6. #6
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Cannot open include file: 'pc.h': No such file or directory

    Quite self-explaining. Make sure that file exists and that it lies in the correct folder.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  7. #7
    Registered User
    Join Date
    Sep 2002
    Posts
    34
    i dont even have pc.h ive looked through the internet but couldnt find it can anyone send me a copy here? [email protected]
    Compiler: MSVC++ 6.0

  8. #8
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Goku-ssj
    i dont even have pc.h ive looked through the internet but couldnt find it can anyone send me a copy here? [email protected]
    read the faq
    hello, internet!

  9. #9
    Registered User
    Join Date
    Sep 2002
    Posts
    34
    which faqs? can u give me a link?
    Compiler: MSVC++ 6.0

  10. #10
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    oh right of course, sorry. the faq of this website, it tells you why i can't send you my pc.h
    hello, internet!

  11. #11
    Registered User
    Join Date
    Sep 2002
    Posts
    34
    can you tell me where i can get a copy?
    Compiler: MSVC++ 6.0

  12. #12
    I lurk
    Join Date
    Aug 2002
    Posts
    1,361
    pc.h is a file included in the allegro library, you're either missing it or it's in the wrong folder or something. Have you gotten any allegro program to compile at all yet? If not I suggest reinstalling the whole library.

    Edit:: I could be totally wrong on this... but I see you're using MSVC++, and I also noticed this in the error message: include\allegro\platform\aldjgpp.h

    DJGPP... are you sure you downloaded and installed the right version of allegro for your specific compiler?
    Last edited by Eibro; 09-14-2002 at 08:03 PM.

  13. #13
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    Originally posted by Eibro
    pc.h is a file included in the allegro library, you're either missing it or it's in the wrong folder or something. Have you gotten any allegro program to compile at all yet? If not I suggest reinstalling the whole library.

    Edit:: I could be totally wrong on this...
    you are. pc.h is a libc header.
    hello, internet!

  14. #14
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052

  15. #15
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    reinstall if you're using msvc++ its simple:

    1) Download the zip file I attached, and extract all the files inside to your allegro directory, overwriting anything it needs.

    2) Copy the allegro directory into your VC98 directory (Part of MSVC++, you'll find it)

    3) Double click "msvcmake" which should be in your allegro directory inside the VC98 directory if you followed the previous instructions.

    4) Or instead of doing step 3 you can open up a DOS window, get to "..../VC98/Allegro" and type "msvcmake.bat".

    Step 3 is easier, heh. At the end of the process you should see a message that says allegro installed successfully.
    Last edited by Leeman_s; 09-15-2002 at 11:10 AM.

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