allegro help

This is a discussion on allegro help within the C++ Programming forums, part of the General Programming Boards category; 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 ...

  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? link_ajg@hotmail.com
    Compiler: MSVC++ 6.0

  8. #8
    moi
    moi is offline
    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? link_ajg@hotmail.com
    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
    moi
    moi is offline
    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 09:03 PM.

  13. #13
    moi
    moi is offline
    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 12:10 PM.

Page 1 of 2 12 LastLast
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, 03:00 AM
  3. double buffering for allegro
    By Leeman_s in forum C++ Programming
    Replies: 6
    Last Post: 09-12-2002, 03:45 PM
  4. Special Allegro Information
    By TechWins in forum Game Programming
    Replies: 12
    Last Post: 08-21-2002, 12:35 AM
  5. Allegro programming in a window
    By Person Man in forum Windows Programming
    Replies: 0
    Last Post: 11-16-2001, 03:23 PM

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