Sign in to follow this  

Problems installing Allegro

This topic is 2388 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've been trying to add the allegro library to Visual C++ 2008 express, but I keep getting the same errors:

[code]Error 1 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup MSVCRTD.lib
[/code]

[code]Error 2 fatal error LNK1120: 1 unresolved externals C:\Users\Owner\Documents\Visual Studio 2008\Projects\allegro_test\Debug\allegro_test.exe
[/code]

And here is my code:

[code]
#include <iostream>
#include <allegro.h>
#pragma comment(lib, "alleg.lib")

using namespace std;

int main( void )
{
int a;
cout << "Allegro is included with no errors" ;
cin >> a;
return 0;
}
[/code]

Share this post


Link to post
Share on other sites
#define [url=http://www.allegro.cc/manual/4/miscellaneous/frequently-asked-questions-%28faq%29/windows-problems/d4cf0624ded68003a11b4892102bbc66]ALLEGRO_USE_CONSOLE[/url] before including <allegro.h>, or switch your project to a Win32 application.

Share this post


Link to post
Share on other sites
This video shows you how to install Allegro with Visual.

[url="http://www.youtube.com/user/CodingMadeEasy#p/c/BA147EB37B0D36B6/0/LS-LuKM29e8"]http://www.youtube.com/user/CodingMadeEasy#p/c/BA147EB37B0D36B6/0/LS-LuKM29e8[/url]

Share this post


Link to post
Share on other sites

This topic is 2388 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this