• Advertisement
Sign in to follow this  

mcsv 2010 error with allegro

This topic is 1915 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using allegro with microsoft visual 2010 and used this tutorial to set up allegro for the compiler


[source lang="cpp"]#include "stdafx.h"
#include <allegro.h>

int main()

set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0);

triangle(screen, 320, 40, 147, 340, 493, 340, makecol(255, 0, 0));
circlefill(screen, 320, 240, 100, makecol(255, 255, 255));

return 0;


when i compile this i get this error

1>------ Build started: Project: allegro, Configuration: Debug Win32 ------
1> allegro.cpp
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>c:\documents\visual studio 2010\Projects\allegro\Debug\allegro.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

im completely new to this compiler so i have no idea what i did wrong [img]http://public.gamedev.net//public/style_emoticons/default/blink.png[/img]

Share this post

Link to post
Share on other sites
Via Googling your error message:

Change the "subsystem" in your linker settings from "Windows" to "Console".
Hopefully that helps =)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement