Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » msvc installation help

Credits go to Evert, Matthew Leverton, and ReyBrujo for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
msvc installation help
Pravit
Member #5,648
March 2005
avatar

Hello,

I've just gotten back to programming with Allegro after a (very long) break, only to find that none of my old games work anymore because I don't have the exact dll I used with them. I'm trying to reinstall Allegro but encountering difficulties. I am trying to compile RC2 with MinGW for MSVC. I encounter this error:

Compiling Allegro for MSVC, optimised. Please wait...
obj/msvc/runner.exe C:/msvc/VC98/bin/cl @ -nologo -W1 -Gd -MD -O2 -I. -I./include -Foobj/msvc/alleg/cpptest.obj -c tests/cpptest.cpp
cpptest.cpp
./include\allegro/inline/draw.inl(67) : error C2562: 'vline' : 'void' function returning a value
./include\allegro/inline/draw.inl(67) : see declaration of 'vline'
./include\allegro/inline/draw.inl(68) : error C2562: 'hline' : 'void' function returning a value
./include\allegro/inline/draw.inl(68) : see declaration of 'hline'
make.exe[1]: *** [obj/msvc/alleg/cpptest.obj] Error 2

I got warnings earlier about 'vline' and 'hline' returning values too.

Can anyone help me?

A J
Member #3,025
December 2002
avatar

Try downloading the newer allegro version.

Make sure you remove your old versions properly before installing the new one.

Then, try it again, if the problem occurs with the newer versions, does it happen with both the debug and release ?

___________________________
The more you talk, the more AJ is right. - ML

Evert
Member #794
November 2000
avatar

Use the attached draw.inl from CVS, the problem should be fixed there.

Pravit
Member #5,648
March 2005
avatar

OK, I'm trying the new draw.inl, now I get this batch of errors:

Compiling Allegro for MSVC, optimised. Please wait...
obj/msvc/runner.exe c:/msvc/vc98/bin/cl @ -nologo -DALLEGRO_SRC -W1 -Gd -MD -O2 -I. -I./include -Foobj/msvc/alleg/allegro.obj -c src/allegro.c
allegro.c
./include\allegro/inline/draw.inl(67) : error C2143: syntax error : missing ')' before '('
./include\allegro/inline/draw.inl(67) : error C2091: function returns function
./include\allegro/inline/draw.inl(67) : error C2059: syntax error : ')'
./include\allegro/inline/draw.inl(68) : error C2371: '_allegro_vline' : redefinition; different basic types
./include\allegro/inline/draw.inl(51) : see declaration of '_allegro_vline'
./include\allegro/inline/draw.inl(68) : error C2146: syntax error : missing ';' before identifier 'AL_ALIAS_VOID_RET'
./include\allegro/inline/draw.inl(68) : error C2143: syntax error : missing ')' before '('
./include\allegro/inline/draw.inl(68) : error C2091: function returns function
./include\allegro/inline/draw.inl(68) : error C2059: syntax error : ')'
./include\allegro/inline/draw.inl(77) : error C2371: '_allegro_hline' : redefinition; different basic types
./include\allegro/inline/draw.inl(59) : see declaration of '_allegro_hline'
./include\allegro/inline/draw.inl(77) : error C2143: syntax error : missing ';' before 'type'

Am I doing this properly? Also, how can I tell it to "make" from the very start instead of picking up where it last had an error?

Evert
Member #794
November 2000
avatar

Hmm... ok, maybe simply using the new file wasn't the best idea. You may be better off grabbing the latest CVS snapshot, see the bottom of [url http://alleg.sourceforge.net/cvs.html].

About rebuilding from the start, you don't normally have to do that since make's purpose is to make sure that you only recompile what's nescessary. Anyway, you can run `make clean' to return to a (more or less) clean set of files.

Matthew Leverton
Supreme Loser
January 1999
avatar

I would just use the precompiled version for MSVC 6.

Pravit
Member #5,648
March 2005
avatar

Thank you for the precompiled files! This is exactly what I was looking for! I can now recompile + play my old projects again!

However, I'm feeling stubborn and I still want to try compiling everything myself. Is it really that hard to do properly? I got the latest CVS snapshot and ran "make depend", but I got

gcc -MM -MG -I. -I./include -DSCAN_DEPEND -DALLEGRO_MSVC src/*.c src/c/*.c src/i386/*.c src/misc/*.c src/win/*.c demo/*.c > _depend.tmp
make.exe: *** [depend] Error -1

I did download sed as well as the w32api package for MinGW.

ReyBrujo
Moderator
January 2001
avatar

Go to command line, and type gcc --version. I believe you don't have MinGW configured correctly.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

It says:
gcc (GCC) 3.4.2 (mingw-special)
Copyright (C) 2004 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.

ReyBrujo
Moderator
January 2001
avatar

Run this by hand: gcc -MM -MG -I. -I./include -DSCAN_DEPEND -DALLEGRO_MSVC src/*.c src/c/*.c src/i386/*.c src/misc/*.c src/win/*.c demo/*.c > _depend.tmp and see what it says

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

It doesn't say anything. I guess it did it OK?

ReyBrujo
Moderator
January 2001
avatar

Yes, try make again now. Also, type sed to see if you have installed sed in a place where it can be called.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

OK, now I get this:
Compiling Allegro for MSVC, optimised. Please wait...
gcc -O -Wall -Werror -o obj/msvc/runner.exe src/misc/runner.c
obj/msvc/runner.exe c:/msvc/vc98/bin/cl @ -nologo -DALLEGRO_SRC -W1 -Gd -MD -O2 -I. -I./include -Foobj/msvc/alleg/allegro.obj -c src/allegro.c
make.exe: *** [obj/msvc/alleg/allegro.obj] Error -1

Also, I do have sed installed in a place where it can be called(the bin directory of my MinGW installation).

ReyBrujo
Moderator
January 2001
avatar

Oh, if you have downloaded the CVS version, some directories aren't created. Check there is a obj/msvc/alleg directory (create them if not)

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

Yes, there is. Inside is a file "makefile.dep"

Maybe I should just try the version on the site instead of the CVS one? I did get a bunch of errors listed above though.

ReyBrujo
Moderator
January 2001
avatar

Well, you have the binaries, so you can use them directly. No need to go with the source compiling ;)

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

Wha...but...I want to experience the joy of Open Source software!

I don't remember it being this hard to compile Allegro myself last time. I remember having to look around on boards and change some source files a bit but other than that I didn't have any major problems. Has anyone else trying to compile for MSVC run into problems or do I just have something set up wrong?

Maybe this will help: I downloaded make and sed from the DJGPP site since I was too lazy to find the w32 binaries for them elsewhere(I downloaded something from the GNU site, but apparently they want you to make make itself. :-/).

Evert
Member #794
November 2000
avatar

Yes, that might make a difference. You should make sure your system is consistent, meaning all your binutils and fileutils should be compiled with MinGW.

Pravit
Member #5,648
March 2005
avatar

So you mean I have to make make? Do I have to do something fancy or can I just type gcc make?

I did notice a make package on the MinGW site, but the readme explicitly mentioned GNU make. Can I just use the MinGW one?

ReyBrujo
Moderator
January 2001
avatar

Try GNUWin32.

(Edited: You download and install MinGW. That will install gcc, make, etc. Then you install from GNUWin32 sed (I think it is in the textutils or in its own package). After you have it all, type sed --version to see if it is working. Finally, delete makefile.dep you told me you have inside obj/msvc/alleg, and try make depend again.

Maybe you need to create the dll entries with fixdll.bat?

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Evert
Member #794
November 2000
avatar

As an aside, if I recall correctly, for the CVS snapshots you don't have to run make depend, as you do when trying to compile a `real' CVS version.

Pravit
Member #5,648
March 2005
avatar

OH MY GOD! IT'S GOING! IT'S GOING! I downloaded the make package from the MinGW site and used that, and now it seems to be going without errors. But now it's complaining about some dlls I don't have, though, like libintl3.dll.

I've been googling it but I haven't found a download link. Is this something that's supposed to come with MinGW?

Edit: So you say no "make depend" is needed? I tried just doing make and I got this error:
Compiling Allegro for MSVC, optimised. Please wait...
obj/msvc/runner.exe C:/msvc/VC98/bin/cl @ -nologo -DALLEGRO_SRC -W1 -Gd -MD -O2 -I. -I./include -Foobj/msvc/alleg/poly3d.obj -c src/poly3d.c
poly3d.c
src/poly3d.c(32) : fatal error C1083: Cannot open include file: 'obj/msvc/asmcapa.h': No such file or directory

Edit: Found libintl3.dll! Make depend runs without errors! This is amazing!!! Now, to run fixdll.bat...

ReyBrujo
Moderator
January 2001
avatar

Remove all your MinGW installation, and download from here the package. It should bring everything you need. Then try compiling again.

Try make mmxtest and make ssetest to see if that fixes the asmcapa.h error.

(Edited: That is, as last resource ;))

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Pravit
Member #5,648
March 2005
avatar

That's a pretty nice, complete package. One wonders why the people at MinGW put together such a nice package, then didn't even bother linking to it on their "Download" page. I was actually having fairly good success with using the seperate packages together(I got it to stop complaining about asmcapa.h by running make depend first), but I decided to use this package anyway. Now I get something completely out of the blue when I try to make:

Your DJGPP environment variable is not set correctly!

I don't even have DJGPP installed.

ReyBrujo
Moderator
January 2001
avatar

fix mingw32 (or fix mingw if the former does not work).

That is the last "full" package, around two years old I think. Now they use something very similar to Cygwin, you download a small (<1mb) program, which shows you what you can download, you choose and download. I hate that kind of stuff, because I like carrying a single setup.exe to friend's houses, not several downloaded files or, worse, a 800kb program to download 40mb through dial-up.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

 1   2 


Go to: