Allegro and windows.h problem

This is a discussion on Allegro and windows.h problem within the Game Programming forums, part of the General Programming Boards category; Im tring to use allegro for graphics and windows.h for random number generation but i get these errors: c:\program files\microsoft ...

  1. #1
    Registered User ~Kyo~'s Avatar
    Join Date
    Jun 2004
    Posts
    319

    Allegro and windows.h problem

    Im tring to use allegro for graphics and windows.h for random number generation but i get these errors:

    c:\program files\microsoft visual studio\vc98\include\wingdi.h(486) : error C2371: 'BITMAP' : redefinition; different basic types
    c:\program files\microsoft visual studio\vc98\include\allegro\gfx.h(220) : see declaration of 'BITMAP'
    c:\program files\microsoft visual studio\vc98\include\wingdi.h(3429) : error C2229: struct 'tagDIBSECTION' has an illegal zero-sized array

    Any ideas maybe if I include the base header file for srand and rand but im not sure what it is; I thought it was math.h but it doesnt seem to work. Any ideas ne1?

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    rand() and srand() are in stdlib.h or cstdlib if you're using C++.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  3. #3
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems reading windows.h
    By yaya in forum Windows Programming
    Replies: 7
    Last Post: 05-22-2009, 02:33 PM
  2. Allegro Programming Question
    By xmltorrent in forum Game Programming
    Replies: 2
    Last Post: 08-24-2006, 02:45 PM
  3. Strange problem with bmp
    By Victor in forum Linux Programming
    Replies: 2
    Last Post: 04-04-2005, 02:48 PM
  4. MENUINFO problem
    By Mecnels in forum Windows Programming
    Replies: 3
    Last Post: 03-18-2003, 12:44 PM
  5. Problems getting allegro to work.
    By Ion Blade in forum Game Programming
    Replies: 6
    Last Post: 06-05-2002, 08:30 PM

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