Skip to main content
GameDev.net gamedev.net
🔒 Locked

mcsv 2010 error with allegro

Started by ChristianFrantz Oct 22, 2012 at 1:45 AM 0 replies 1.4k views
Original Post
ChristianFrantz
ChristianFrantz
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

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 :)
yewbie
yewbie
Via Googling your error message:

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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.