Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Installing Allegro under Visual C++.Net

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Installing Allegro under Visual C++.Net
Timothy Chan
Member #2,663
August 2002

Um..any ideas? The guide for Visual C++ 6 doesn't seem to work here...and I'm clueless on how to proceed.

Thanks!
Tim Chan

Matthew Leverton
Supreme Loser
January 1999
avatar

It works the same way basically, but you'll need to compile from source.

So, get MinGW32 and install that to start off.

You'll also need to edit a file:

C:\Program Files\Microsoft Visual Studio .NET\Common\Bin\vsvars32.bat

(The exact location may be slightly different.)

You should see a variable called "MSVCDir". You'll need to adjust it and remove all spaces from the path. So, change it to look something like:

C:\PROGRA~1\MICROS~1.NET\VC

Once again, this is machine dependent.

Once you do that, you need to (from a DOS prompt):

> vsvars32 (may need to be in the proper directory)
> fix msvc
> make all
> make installall

It should work then.

Mike Vox
Member #2,701
September 2002
avatar

I'm trying to install Allegro with MSVC++ .Net now, also, and am having some trouble figuring it out.

I have the Allegro 4.1.4 source located in the
C:\Program Files\Microsoft Visual Studio .NET\Vc7\allegro

directory, and I have installed MinGW in the
C:\MinGW

directory, and I have included in the Windows XP path
C:\MinGW\bin

and I found the file "vsvars32.bat" located in the
C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools

directory, and I changed the variable to
@set MSVCDir=C:\progra~1\micros~1.net\VC7

At this point, I re-booted and went to the dos prompt. I followed the instructions as mentioned above, but when I enter "make all" I get the following at the DOS prompt:
'make' is not recognized as an internal or external command, operable program or batch file.

I must have missed something, but dunno what it is.::)

Mike_Vox

Matthew Leverton
Supreme Loser
January 1999
avatar

If the MinGW\Bin folder isn't in your path, you need to (after you run vsvars32.bat):

SET PATH=%PATH%;C:\MinGW\bin

However, make sure you truly have an executable named "make" in your bin folder. The latest version of MinGW named it something else.

Mike Vox
Member #2,701
September 2002
avatar

Yeap, the latest version of MinGW they renamed it to 'mingw32-make'. Thanks for the help.

Mike_Vox

Timothy Chan
Member #2,663
August 2002

Thanks I'll try it out!

the_y_man
Member #1,770
December 2001
avatar

isnt it about time the allegro core team update to MSVC.net? (with backward compatibility to msvc 6.0)

Timothy Chan
Member #2,663
August 2002

I'm even more lost now. Which files am I supposed to get? I installed http://prdownloads.sourceforge.net/mingw/MinGW-2.0.0-3.exe to c:\mingw

Then I downloaded:

http://208.247.248.26/~matthew/files/4.0.2/allegro-4.0.2-msvc.zip

And extracted it with paths to:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\allegro

I also then got http://208.247.248.26/~matthew/files/4.0.2/allegro-4.0.2-msvcmake.zip and http://208.247.248.26/~matthew/files/4.0.2/all402.zip and extracted all those files to the same directory (C:\Program Files\Microsoft Visual Studio .NET\Vc7\allegro).

Finally I run vsvars32...which doesn't seem to do anything....and then

> fix msvc
> make all
> make installall

does not exist?

I run install.bat..that seems to go fine...
then I run msvcmake.bat which gives me a whole bunch of not a valid system command..then do I want to copy includes to vc? I respond with yes and that seems to go ok.

And how does one set a path (SET PATH=%PATH%;C:\MinGW\bin)? Is that using the environmental variables or user variables found in winXP from the system properties?

Finally...I can't find 'mingw32-make'.

I've only gotten more confused I believe...not to mention I have allegro files...in a number of places now.

-Tim

Matthew Leverton
Supreme Loser
January 1999
avatar

msvcmake.zip is only needed if you do not have MinGW32 installed. We'll pretend you don't have it, after all it's designed to work with MSVC 6.

The first thing you need to get MinGW32 working. You should be able to open a command prompt and type:

make -v
gcc -v

Neither should return an error. If they do, set up your PATH as a system environment variable, as the various docs suggest. Just add C:\MinGW\bin to the list, don't bother with %PATH%.

Once that's working, we can continue on.

Timothy Chan
Member #2,663
August 2002

This is weird. Make used to work...after modify the environmental variable, gcc -v works, but make -v no longer works. What does don't both %path% mean? Thank you for your continued help. It is appreciated.

C:\Documents and Settings>gcc -v
Reading specs from C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --host=
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)

C:\Documents and Settings>make -v
'make' is not recognized as an internal or external command,
operable program or batch file.

Matthew Leverton
Supreme Loser
January 1999
avatar

Look for a file ending in "make" in the C:\MinGW32 folder. If you don't have one, you must have accidently deleted it, and you'll have to reinstall MinGW32.

Quote:

What does don't both %path% mean?

I left off the 'er' on 'bother'. I just meant, when you edit your PATH environment variable, you shouldn't type %PATH% literally.

Timothy Chan
Member #2,663
August 2002

Ok. It works now. How do I proceed from here?

C:\>gcc -v
Reading specs from C:/MinGW/bin/../lib/gcc-lib/mingw32/3.2/specs
Configured with: ../gcc/configure --with-gcc --with-gnu-ld --with-gnu-as --hos
mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enab
-languages=f77,c++,objc,ada --disable-win32-registry --disable-shared
Thread model: win32
gcc version 3.2 (mingw special 20020817-1)

C:\>mingw32-make -v
GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for mingw32
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Report bugs to <bug-make@gnu.org>.

C:\>

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

You'll also need to edit a file:

C:\Program Files\Microsoft Visual Studio .NET\Common\Bin\vsvars32.bat

(The exact location may be slightly different.)

You should see a variable called "MSVCDir". You'll need to adjust it and remove all spaces from the path. So, change it to look something like:

C:\PROGRA~1\MICROS~1.NET\VC

Once again, this is machine dependent.

If you do the above correct, you should be able to open up a command prompt and type:

C:\PROGRA~1\MICROS~1.NET\Common7\Tools\vsvars32.bat

[That path will vary - specifically the ~1 marks may be different. On my PC, it's ~1 on progra, and ~2 on MICROS.]

And then echo %MSVCDir% should display the directory.

Timothy Chan
Member #2,663
August 2002

Ok. That worked.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Timothy>C:\PROGRA~1\MICROS~1.NET\Common7\Tools\vsvars3
2.bat
Setting environment for using Microsoft Visual Studio .NET tools.
(If you also have Visual C++ 6.0 installed and wish to use its tools
from the command line, run vcvars32.bat for Visual C++ 6.0.)

Ok..now I did vsvars32 and that worked.
However fix msvc doesn't work.

C:\Documents and Settings\Timothy>vsvars32
Setting environment for using Microsoft Visual Studio .NET tools.
(If you also have Visual C++ 6.0 installed and wish to use its tools
from the command line, run vcvars32.bat for Visual C++ 6.0.)

C:\Documents and Settings\Timothy>fix msvc
'fix' is not recognized as an internal or external command,
operable program or batch file.

Matthew Leverton
Supreme Loser
January 1999
avatar

After running vsvars32.bat, type:

echo %MSVCDir%

It should read:

C:\PROGRA~1\MICROS~1.NET\VC

If that's all good and well, continue on by going to the /allegro directory:

cd\path\to\allegro

From there:

fix msvc
make all
make installall

That should do it.

Timothy Chan
Member #2,663
August 2002

Ok...echo works...

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>echo %msvcdir%
C:\PROGRA~1\MICROS~1.NET\VC7

I'm in my allegro directory, however fix isn't a valid comand.

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>fix
'fix' is not recognized as an internal or external command,
operable program or batch file.

I've tried reinstalling allegro...doesn't seem to work.

Any ideas?

Matthew Leverton
Supreme Loser
January 1999
avatar

Make sure you have the complete source edition of allegro, and not the binary copies. The source edition comes with a file called "fix.bat".

Timothy Chan
Member #2,663
August 2002

That did the trick...I just found fix.bat in one..overwriting now..hope this works this time..I think it will!

Well..actually just finished the above..doesn't work....

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>fix msvc
Configuring Allegro for Windows/MSVC...
Converting Allegro files to DOS CR/LF format...
'utod' is not recognized as an internal or external command,
operable program or batch file.
'utod' is not recognized as an internal or external command,
operable program or batch file.
Done!
C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>

Thomas Fjellstrom
Member #476
June 2000
avatar

[edit] Nevermind...

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Timothy Chan
Member #2,663
August 2002

Fix.bat is there.

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>fix

Usage: fix platform [--quick]

Where platform is one of: bcc32, djgpp, mingw32, msvc or watcom.
The --quick parameter is used to turn off LF to CR/LF conversion.

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>fix msvc
Configuring Allegro for Windows/MSVC...
Converting Allegro files to DOS CR/LF format...
'utod' is not recognized as an internal or external command,
operable program or batch file.
'utod' is not recognized as an internal or external command,
operable program or batch file.
Done!
C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>

Thomas Fjellstrom
Member #476
June 2000
avatar

Done!

Just ignore the warnings about utod and dtou, Its not really nesesary to use.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Timothy Chan
Member #2,663
August 2002

Ok...ignoring and proceeding.

I get the following errors:

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>mingw32-make all
mingw32-make msg lib
mingw32-make[1]: Entering directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
Compiling Allegro for MSVC, optimised. Please wait...
gcc -O -Wall -Werror -o obj/msvc/runner.exe src/misc/runner.c
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_SRC -W1 -Gd -Ox -GB -MD -I. -I./inclu
de -Foobj/msvc/alleg/allegro.obj -c src/allegro.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make[1]: *** [obj/msvc/alleg/allegro.obj] Error 1
mingw32-make[1]: Leaving directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
mingw32-make: *** [all] Error 2

Then....

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>ming32-make installall
'ming32-make' is not recognized as an internal or external command,
operable program or batch file.

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>mingw32-make installall
mingw32-make msg lib install
mingw32-make[1]: Entering directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
Compiling Allegro for MSVC, optimised. Please wait...
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_SRC -W1 -Gd -Ox -GB -MD -I. -I./inclu
de -Foobj/msvc/alleg/allegro.obj -c src/allegro.c
'cl' is not recognized as an internal or external command,
operable program or batch file.
mingw32-make[1]: *** [obj/msvc/alleg/allegro.obj] Error 1
mingw32-make[1]: Leaving directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
mingw32-make: *** [installall] Error 2

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>

Thomas Fjellstrom
Member #476
June 2000
avatar

It couldnt find 'cl'? Thats the compiler :)

Are you sure you ran the msvcvars batch file? It has to be run everytime you open a new command window and want to install allegro :)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Timothy Chan
Member #2,663
August 2002

oh ok...trying....some progress....will continue with proccess...finished.....

mingw32-make all worked fine

however mingw32-make installall gave the following errors:

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>mingw32-make installall
mingw32-make msg lib install
mingw32-make[1]: Entering directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
Compiling Allegro for MSVC, optimised. Please wait...
mingw32-make[1]: Nothing to be done for `lib'.
copy lib\msvc\alleg.lib \lib
1 file(s) copied.
copy include\allegro.h \include
1 file(s) copied.
md \include\allegro
The system cannot find the path specified.
mingw32-make[1]: *** [/include/allegro] Error 1
mingw32-make[1]: Leaving directory `C:/PROGRA~1/MICROS~1.NET/Vc7/allegro'
mingw32-make: *** [installall] Error 2

C:\PROGRA~1\MICROS~1.NET\Vc7\allegro>

Thomas Fjellstrom
Member #476
June 2000
avatar

looks good. let us know if you get it :)

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

 1   2 


Go to: