Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Installing Allegro with Microsoft Visual C++ 6.0 and DJGPP

This thread is locked; no one can reply to it. rss feed Print
Installing Allegro with Microsoft Visual C++ 6.0 and DJGPP
ThisisNate
Member #7,578
August 2006

Hi !

I'm quite new to Allegro. I have a difficulty installing Allegro in my system.
I currently have MSVC++ version 6.0.
I've read through all instruction but still couldn't figure out
Do I really need a DJGPP? Can I use VC6.0 with Allegro only?

However, these are what I did

I downloaded DJGPP for GNU environment as what it said in readme file.
It said that I need to install GNU DJGPP first.
So I did , following the guideline from DJGPP (below)
.......
---->
Create a directory for DJGPP, say C:\DJGPP. (WARNING: do NOT
install DJGPP in a directory C:\DEV, D:\DEV, etc., or in any of their
subdirectories: it will not work! See the FAQ for more details.) Do
not use a long directory name or one with spaces or special characters.

2. Unzip all the zip files from that directory, preserving the
directory structure. For example:

pkunzip -d djdev203
or
unzip32 djdev203

3. After unzipping all the zip files, set the DJGPP environment
variable to point to the file DJGPP.ENV in the main DJGPP
installation directory and add its BIN subdirectory to your PATH.

The exact way how these variables should be set depends on your
operating system:

* For Windows 2000 or Windows XP systems:

- Right-click "My Computer", then select "Properties";
- Select the "Advanced" tab, then click "Environment Variables" button;
***** - Edit the PATH system variable to add the DJGPP bin subdirectory;
(if you are not an administrator, add the DJGPP bin directory to
the user PATH variable - or create one with only this directory
since it is added to the system path);
**** - Add a new variable DJGPP and set its value to the full path
name of the DJGPP.ENV file as explained below.

***** This is where I have a difficulty with.

- How can I edit the Path System Variable?
- How can I add a new variable DJGPP and set its value to the full path?

What I did was click "new" on SYstem Variable
and set value of the following
Variiable Name: Path
Variable Value: c:\djgpp\bin
and
Variable Name: DJGPP
Variable Value: C:\DJGPP\DJGPP.ENV

Is it a correct way to do?

Then I go to where Allegro is unzipped.
then Type "Make" like what it said in the readme file.
It does n't work. It said "make is not recognized as an internal
and external command.....".
=========================================================================
THen What should I do next?

I already unzipped Allegro into c:\allegro
and DJGPP into c:\Djgpp.
My oS is windows XP with Microsoft Visual C++ 6.0

Thanks

Matthew Leverton
Supreme Loser
January 1999
avatar

You need DJGPP or MinGW to help build Allegro. If you don't want to build it yourself, get the pre-built package from the files page.

To set your path temporarily, do this:

set PATH=C:\DJGPP\BIN;%PATH%
cd\allegro
fix msvc6 --msvcpaths
make all
make installall

You might have to run your vcvars32.bat file first.

ThisisNate
Member #7,578
August 2006

Thank you for reply. It really helps a lot for prebuilt version of allegro.
However, after I put everything in.
and Run VC++6.0 with this code

#include <allegro.h>

int main(){

allegro_init();
install_keyboard();
set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);

readkey();

return 0;

}
END_OF_MAIN();

This is what I've got after I run the code above
-------------------Configuration: Cpp1 - Win32 Debug-------------------
Linking...
Cpp1.obj : error LNK2001: unresolved external symbol __imp__readkey
Cpp1.obj : error LNK2001: unresolved external symbol __imp__set_gfx_mode
Cpp1.obj : error LNK2001: unresolved external symbol __imp__install_keyboard
Cpp1.obj : error LNK2001: unresolved external symbol __imp__install_allegro
Cpp1.obj : error LNK2001: unresolved external symbol __imp___WinMain
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp1.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.

Cpp1.exe - 7 error(s), 0 warning(s)

What is going on...???
Is there something wrong with it?

THanks you

Matthew Leverton
Supreme Loser
January 1999
avatar

You need to link against alleg.lib and use a Win32 Application, not console.

Kitty Cat
Member #2,815
October 2002
avatar

It looks like you're not linking against Allegro. You need to add alleg.lib to the list of libraries to link with.

EDIT: too slow :(

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

ThisisNate
Member #7,578
August 2006

Thank you for reply again.
I did put the same code as I mentioned earlier.
I did add "allege.lib"
and using win32 App project

Now, it works well

Thank you very much for all replies
appreciated....

Go to: