Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-12-2005, 06:08 AM   #1 (permalink)
Link-Jun
Registered User
 
Join Date: Feb 2005
Posts: 1
Link-Jun is on a distinguished road
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!
Link-Jun is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
M$ .net Kernel_Killer Lounge 0 12-09-2004 05:09 AM
PHP vs .NET Redline Lounge 1 11-24-2004 07:10 AM
for anyone running 2003 and cant get OpenGL Timmay Windows 3 07-25-2003 10:53 AM
E mail Bombed NOT FOR KIDS (Rated R) Eyelfixit Lounge 10 07-09-2003 11:13 AM
Antivirus Concerns in XP and .NET Environments redhead Code Newbie News 1 07-07-2003 03:08 PM


All times are GMT -8. The time now is 01:46 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting