Allegro withMSVC++.NET

Started by
10 comments, last by K88soft 19 years, 6 months ago
This is from Game programming all in one 2nd ED. #include <allegro.h> int main(void) { // Initialize Allegro. allegro_init(); // Set the resolution to 640 by 480 with SAFE autodetection. set_gfx_mode(GFX_SAFE, 1280, 1024, 0, 0); // Installing the keyboard handler. install_keyboard(); // Printing text to the screen. textout(screen, font, "Hello World!", 1, 1, 10); textout(screen, font, "Press ESCape to quit.", 1, 12, 11); // Looping until the ESCape key is pressed. while(! key[KEY_ESC]) poll_keyboard(); // This shouldn't be necessary in Windows. // Exit program. allegro_exit(); return 0; } // Some Allegro magic to deal with WinMain(). END_OF_MAIN(); and it says c:\Documents and Settings\K88soft\My Documents\Visual Studio Projects\HelloWorld\main.c fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory I added the alleg.lib file with winmm.lib why won't it work I think I may need to install SDK first but I'm not sure. can anyone help my?
Eat food and life is yours!
Advertisement
You don't have the allegro headers in the include path
plz don't get mad but what are they?
Eat food and life is yours!
The header file is allegro.h. And your compiler can't find it.

Did you successfully (and fully) install Allegro?

Jesus saves ... the rest of you take 2d4 fire damage.

to be honest I'm notsure if I installed it correctly.
I'm reading how to compile
the code in back of the book and it says I need a make.exe that suposedly comes with DevC++ but I don't want it to take over my MSVC++ and I just can't find this Make.exe by itself. there has to be an easier way of working with Allegro. I just can't find it [sad]
Quote:Original post by Anonymous Poster
there has to be an easier way of working with Allegro. I just can't find it [sad]

Lots of options ...

Jesus saves ... the rest of you take 2d4 fire damage.

ok I'm back (had some personal time off) well I got it to work all the up to "

Using c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat
Invoking nested command interpreter

C:\Documents and Settings\K88soft\My Documents\allegro>"C:\Program Files\Microso
ft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"
Setting environment for using Microsoft Visual Studio .NET 2003 tools.
(If you have another version of Visual Studio or Visual C++ installed and wish
to use its tools from the command line, run vcvars32.bat for that version.)

C:\Documents and Settings\K88soft\My Documents\allegro>"

I don't have another version would should I do. I have tried but I don't know how to get by this part of the installation
Eat food and life is yours!
your options aren't pointed for .net user so what do I do now why i'm I have so many troubles?
Eat food and life is yours!
I honestly don't know; I'm not a .Net user. I'll see what I can dig up ...

Jesus saves ... the rest of you take 2d4 fire damage.

Quote:Original post by K88soft
I don't have another version would should I do. I have tried but I don't know how to get by this part of the installation

Well, according to the docs, you "make", and then "make install". The output you see is perfectly normal; not even an error.

But if it's still giving you problems, the precompiled binaries are right here. Maybe that will be easier.

(thanks to Matthew Leverton for the answers [smile])

Jesus saves ... the rest of you take 2d4 fire damage.

This topic is closed to new replies.

Advertisement