Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 4.01, Borland Builder 5, and Win XP

This thread is locked; no one can reply to it. rss feed Print
Allegro 4.01, Borland Builder 5, and Win XP
Emil
Member #855
December 2000

I have just downloaded Allegro 4.0.1 (all401.zip). I put the allegro folder in my Borland Builder 5 folder (c:\program~1\Borland\cbuilder5), and put the GNU make file into the allegro folder. I ran fix.bat bcc32 and that worked fine. Then when I run make I get the error message:

C:\PROGRA~1\Borland\CBuilder5\allegro>make
Compiling Allegro for BCC32, optimised. Please wait...
bcc32 -O2 -OS -q -W -I. -I./include -c -oobj\bcc32\alleg\dibgrab.obj tests\win\
dibgrab.c
make.exe: *** [obj/bcc32/alleg/dibgrab.obj] Error -1

I have:
C:\PROGRA~1\Borland\CBuilder5\allegro and C:\PROGRA~1\Borland\CBuilder5\
In my PATH (in autoexec.bat)

I am using Windows XP on a P4 1.7G computer with 512 MB RAM

I have also tried Allegro 4.0.0 and Allegro 3.9.4 with similar error messages.

I have compiled and used Allegro 3.9.4 under Win 98 with Borland Builder 5 and it worked flawlessly, but I am having problems with XP.

Please tell me what the problem is or maybe provide some suggestions. Has anyone successfully used a Borland compiler and Win XP with Allegro?

Bob
Free Market Evangelist
September 2000
avatar

Are you using DJGPP too? There's a bug in WinXP that makes it virtually impossible to run DJGPP programs. Try using Mingw instead. (remember to uninstall DJGPP though).

--
- Bob
[ -- All my signature links are 404 -- ]

Emil
Member #855
December 2000

No, I do not have DJGPP installed. I know about Ming but I want to use Borland Builder 5. I know that it can work with Allegro beacuse I had it working before. I had a hard drive crash and I lost my working Win 98, Builder, and Allegro 3.9.4 environment. I don't want to go back to Win 98 because it's old and unstable (at least for me lots of crashes), and my new computer came with XP. Win XP seems more robust. Any other suggestions? Thank you for your timely reply.

Bob
Free Market Evangelist
September 2000
avatar

Quote:

- Borland C++Builder (or Borland C++ command line tools)
- Recent set of DirectX and other Windows SDK headers.
- GNU make (mak*b.zip).
- Optional: sed (sed*b.zip). Used by "make depend" and "fixdll.bat".
- Optional: sort (txt*b.zip). Used by "fixdll.bat". GNU sort, not DOS!

You need some DJGPP programs - thus you will be exposed to the bug in WinXP. Either get Mingw's make, or reinstall Windows 98.

--
- Bob
[ -- All my signature links are 404 -- ]

ReyBrujo
Moderator
January 2001
avatar

Quote:

WINDPMI.386 is not properly installed. It needs to be installed to run the
Borland 32 bit DOS extender under Windows 3.x

Though no XP, it is still Borland... I am working with Win95 OSR2, MAKE 3.78.1, TASM 5.0, BCC32 v5.5, and even included Windpmi.386 in the System.ini... But nothing worked... implib always throws this message.

And I have problems with Watcom, but seems it is a bug in the compiler roll eyes

RB

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

Emil
Member #855
December 2000

Thanks Bob, your advice was right on point. Mingw’s make file allowed me to build the library and install it with no errors. Now I have another problem.

I wanted to test Allegro with Borland so I tried this code from the Dev-C (MingW) tutorial.

#include "allegro.h"

int main() {
allegro_init();
allegro_message("Hello World");
return 0;
}
END_OF_MAIN();

I ran it in a Win32 project (not console), a .cpp file, and I also linked it with alleg.lib and alld.lib, just like I used to when I had Win98…

This is my error:

[Linker Error] Unresolved external 'WinMain' referenced from C:\PROGRAM FILES\BORLAND\CBUILDER5\LIB\C0W32.OBJ

But I have found that just by making the source file a .c file instead of a .cpp file, the code builds and runs perfectly. I also am able to build and run the .c files in the allegro\examples folder. So basically, I can’t compile for C++.

Also, when I use a .cpp file I have to include <stdlib.h> before “allegro.h” or I get some stdlib errors.

I have also tried including <windows.h>, but I get errors because of multiple declarations of BITMAP.

Any suggestions?

ReyBrujo
Moderator
January 2001
avatar

Not sure though, but heard that you needed to include "winalleg.h" before "allegro.h"... or something like that...

RB

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

Emil
Member #855
December 2000

ReyBrujo, that was it! I really appreciate the help. Thanks man.

Just so you know for sure, it's include "winalleg.h" after "allegro.h"

Peace.

Andy Sheffield
Member #1,683
November 2001

you have do include stdlib.h before that or you'll have a problem with one of the Borland Libraries

Go to: