mcsv 2010 error with allegro

Started by
0 comments, last by yewbie 11 years, 6 months ago
I'm using allegro with microsoft visual 2010 and used this tutorial to set up allegro for the compiler

blog.hamidnazari.com/2010/07/21/installing-allegro-on-visual-cpp-express-2010/

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

int main()
{
allegro_init();
install_keyboard();

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;
}

END_OF_MAIN();[/source]

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 blink.png

If you see a post from me, you can safely assume its C# and XNA :)

Advertisement
Via Googling your error message:

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

This topic is closed to new replies.

Advertisement