| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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! |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Trouble using allegro in .NET 2003 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|