allegro?

allegro?

Page 1 of 1

1 Replies - 1209 Views - Last Post: 20 May 2010 - 02:48 PM Rate Topic: -----

#1 glhnmswn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 21-December 09

allegro?

Posted 20 May 2010 - 01:51 PM

that is simple code from book.but there are errors..
[linker error] undefined reference to 'WinMain@16'
ld returned 1 exit status

/* Fig. 15.1: fig15_01.c
   A simple Allegro program. */
#include <allegro.h>

int main( void )
{
   allegro_init(); /* initialize Allegro */
   allegro_message( "Welcome to Allegro!" ); /* display a message */
   return 0;
} /* end function main */
END_OF_MAIN() /* Allegro-specific macro */



what can ı do ? thanks a lot

Is This A Good Question/Topic? 0
  • +

Replies To: allegro?

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: allegro?

Posted 20 May 2010 - 02:48 PM

My (educated) guess is that you are trying to compile the program as a Win32 application when you should be compiling as a console application (Allegro needs this right?). If you are using Visual studio, just create a console application and run the same code, see what happens.

I might be wrong though, if you are already compiling as a console app, try the other way round and compile as Win32.

This post has been edited by Aphex19: 20 May 2010 - 02:49 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1