C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 12th, 2005, 08:00 AM
Link-Jun Link-Jun is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 4 Link-Jun User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 43 m 58 sec
Reputation Power: 0
Trouble using allegro in .NET 2003

Hi, I recently downloaded the allegro 4 source (all403.zip) and msvc7 make version, because if i understand it right, visual studio .net 2003 uses VC++ 7.0. So anyway, i followed the instructions on http://www.allegro.cc/files/install-msvc.html and created a new directory C:\VC\Allegro, and unzipped both of the files into that folder. Then I ran msvcmake.bat, and it appeared that everything went just fine. It asked whether I wanted to copy the allegro headers and libraries into my .NET directories, and I said yes. Im not sure whether this means anything or not, but the msvcmake.bat program seemed to end rather abruptly, it didnt display any dialog saying that it had successfully compiled or anything, but I assumed that it compiled just fine. So I started a new c++ console application project, and added the following code:

#define ALLEGRO_USE_CONSOLE

#include "stdafx.h" // pre-compiled header
#include "allegro.h"
#include <iostream>
#include <conio.h> // for getch

using namespace std;

int main(void)
{
allegro_init();

_getch();

return 0;
}

END_OF_MAIN();

But when I went to compile it, I get that nasty link error 2019 (unresolved external symbol _main referenced in function _mainCRTStartup). Now, I always thought that that error only arises when you dont have a main function, which I do.

In the Project Properties --> Linker --> System page, my SubSystem has /SUBSYSTEM:CONSOLE selected, which I assume is what I want since I am trying to compile a program simply to run on the command prompt.

I cant figure out what is causing that error! I'm pretty sure it has something to do with allegro, because when i comment out the three lines that pertain to the allegro library, my program compiles perfectly with no errors. Hopefully someone can give me some help, thanks in advance!

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Trouble using allegro in .NET 2003


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT