Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro on Borland TurboC++

Credits go to nonnus29 for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro on Borland TurboC++
lordSauron
Member #8,932
August 2007
avatar

Hi, fresh install of TurboC++, threw the allegro files in there and tried to run a sample and it said:

[C++ Error] al386vc.h(51): E2108 Improper use of typedef 'BITMAP'
[C++ Fatal Error] al386vc.h(51): F1001 Internal code generator error

Something tells me that's not normal. I'm rather new to C++, trying to build a game after having determined that Java will not work (ever tried to make AWT/Swing thread safe? Not pretty). I've had experience with C++ before, so I'm not exactly one with the word "n00b" plastered all over my forehead, however, I'd like to use TurboC++ because it seems stable and has a long history of being stable and quite mediocre. It's not weird like MSVC++ is, and isn't dated like DEVC++. However, this is a significant pitfall. I think I didn't install it correctly. I downloaded the msvc80 version for a lack of something labeled "Borland" and threw the various files and directories from the allegro download into their respective locations in the Borland C++ directory (merged the two file trees).

This is the Hello-World I tried to run:

//---------------------------------------------------------------------------

#include <allegro.h>

#pragma hdrstop

//---------------------------------------------------------------------------

#pragma argsused
int main(int argc, char* argv[])
{
allegro_init();
set_gfx_mode(GFX_SAFE, 640, 480, 0, 0);
install_keyboard();
textout_ex(screen, font, "Hello World!", 1, 1, 10, -1);
textout_ex(screen, font, "Press ESCape to quit.",1,12,11,-1);
while(!key[KEY_ESC]);
allegro_exit();
return 0;

}

As you can see, it's partially autogenerated by the IDE. I'm not sure if I'm to fault or if I didn't set it up correctly. Any help would be greatly appreciated.

Peter Wang
Member #23
April 2000

Just use mingw or MSVC and save yourself the trouble.

Quote:

long history of being stable and quite mediocre.

:P

Audric
Member #907
January 2001

Turbo C++ ? The DOS one ? Wow.
It IS dated, and nobody ported Allegro to it, sorry. There's no way you can compile with allegro on it.
If you're running DOS, you can use DJGPP : with the IDE "RHIDE" it looks very much like TC++. Use an Allegro version before 4.1 though, as the later versions seem to have a less accurate keyboard handler for DOS.

nonnus29
Member #2,606
August 2002
avatar

Quote:

I'm rather new to C++, trying to build a game after having determined that Java will not work (ever tried to make AWT/Swing thread safe? Not pretty). I've had experience with C++ before, so I'm not exactly one with the word n00b plastered all over my forehead, however, I'd like to use TurboC++ because it seems stable and has a long history of being stable and quite mediocre. It's not weird like MSVC++ is, and isn't dated like DEVC++.

Well, may not plastered, but possibly printed in strong type....

;)

Thomas Harte
Member #33
April 2000
avatar

I don't have an answer, but I'm pretty sure the original poster is referring to the new Turbo C++ and not the ancient DOS one from prehistory. Which I'm still a little fond of.

Jonatan Hedborg
Member #4,886
July 2004
avatar

DevC++ is not even a compiler - it's just an IDE. Use mingw as a compiler and CodeBlocks as IDE. It works great.

lordSauron
Member #8,932
August 2007
avatar

Quote:

I don't have an answer, but I'm pretty sure the original poster is referring to the new Turbo C++ [turboexplorer.com] and not the ancient DOS one from prehistory. Which I'm still a little fond of.

Precisely.

I say DEVC++ is dated because it hasn't moved from version 4.9.9.2 in about three years or so. It's by far one of my favorite compilers, but it's just getting old and showing it.

The TurboC++ Explorer uses the Borland compiler (I think), so it should work (I think).

TurboC++ for DOS... maybe all the Java junkies were right about how dated you C++ people are... ducks

Matthew Leverton
Supreme Loser
January 1999
avatar

Dev-C++ is not a compiler. It's an IDE. The compiler has been updated many times over the last three years. But Jonatan already said that.

lordSauron
Member #8,932
August 2007
avatar

I'm sorry I mispoke. I am aware of the difference between compiler and IDE, however, I'm electing to not use DEVC++/MINGW/GCC because the development environments (IMHO) suck. TC++(Explorer) is more suited to my tastes. I will not use VC++ because it sucks worse. If I ever need to port... VC++ isn't C99 compliant and isn't showing any signs of being C++0x compliant. MSFT is moving VC++ towards being a more runtimed language focused on one platform. I'll let you guess which.

Borland is C99 compliant, so if I'm careful and don't use any platform-specific code or obfuscate it through wrapper classes I can easily port it to other platforms. I'm using Windows at the moment because my windows box is plugged into my 20" widescreen monitor. I like coding with it. Otherwise I'd use Linux and emacs/vi in a heartbeat.

I repent of calling DEVC++ a compiler. Can I get out of the doghouse now? :-/

HoHo
Member #4,534
April 2004
avatar

Quote:

It's by far one of my favorite compilers, but it's just getting old and showing it.

How is it showing? Has it aquired new bugs during that time or you just say that it hasn't got the features some other compilers IDEs do?

Another quite nice IDE is QDevelop, though it is mainly for developing QT applications. Still one should be able to use it with other libs too :)

[edit]

http://www.gnu.org/software/emacs/windows/faq1.html#support
http://www.winvi.de/en/

[edit2]

Another possibility is to use some remote desktop software and work like that on your Linux box while sitting behind another PC. I did it for a while and at least in LAN it worked perfectly.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

lordSauron
Member #8,932
August 2007
avatar

Quote:

HoHo:

Quote:

It's by far one of my favorite compilers, but it's just getting old and showing it.

How is it showing? Has it aquired new bugs during that time or you just say that it hasn't got the features some other compilers do?

No, it just hasn't changed. TC++ has many useful features and IDE improvements which I value, whereas DEVC++ doesn't have much going for it. I know they managed to get some kind of autocompletion going in it, but it still isn't enough to make me use it when there are better tools.

Quote:

Another quite nice IDE is QDevelop, though it is mainly for developing QT applications. Still one should be able to use it with other libs too :)

I've used KDevelop on Linux quite extensively, however, that doesn't work on windows.

Frankly, I'm not willing to see Microsoft put the Malicious Software Removal Tool into work on my OSS applications. I can feel MSFT growling at OpenOffice and GIMP already.

Quote:

[edit2]

Another possibility is to use some remote desktop software and work like that on your Linux box while sitting behind another PC. I did it for a while and at least in LAN it worked perfectly.

I've done that before, however, the rdesktop doesn't support the higher screen resolutions. I'm always stuck at 1024x768 in rdesktop, even though my NEC is capable of 1680x1050. It was quite disappointing.

nonnus29
Member #2,606
August 2002
avatar

Quote:

I repent of calling DEVC++ a compiler. Can I get out of the doghouse now? :-/

Yeah, sure. Oh wait, who's got the key to the doghouse this week?

???

lordSauron
Member #8,932
August 2007
avatar

Tried a few more tricks.

I tried every distribution of Allegro (excepting the MinGW ones, which would obviously would not have worked) without success. I don't think Allegro works with Borland. Perhaps this support was phased out sometime in the past?

I'll leave this open to anyone who knows better and can tell me where I erred. For now I guess I'm stuck with DevC++. Pray MSFT doesn't notice. They've threatened to terminate my license key before for using OSS.

Jonatan Hedborg
Member #4,886
July 2004
avatar

For gods sake, use CodeBlocks instead of DevC++. It's not nearly as buggy, has better code completion and some other spiffy features. And it can download DevPaks. And it's still under development.

lordSauron
Member #8,932
August 2007
avatar

Something tells me that by the end of this I'll have every IDE known to man and seven known only to aliens installed.

I'll look into codeblocks, though I already have DevC++ installed and working.

HoHo
Member #4,534
April 2004
avatar

Quote:

I've used KDevelop on Linux quite extensively, however, that doesn't work on windows.

KDevelop!=Qdevelop. For one thing QDevelop works fine on Windows wheras KDevelop4 has some problems like being prealpha :P

Quote:

Frankly, I'm not willing to see Microsoft put the Malicious Software Removal Tool into work on my OSS applications. I can feel MSFT growling at OpenOffice and GIMP already.

What has that got to do with anything?

Quote:

I've done that before, however, the rdesktop doesn't support the higher screen resolutions. I'm always stuck at 1024x768 in rdesktop, even though my NEC is capable of 1680x1050. It was quite disappointing.

I used KRDC to connect to a windows box and could define my own resolution there. As my monitor went up to 1280x1024 I didn't try anything higher but I bet it would have worked.

Quote:

They've threatened to terminate my license key before for using OSS.

I don't lespecially love MS either but I try to not spread FUD :-/

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

lordSauron
Member #8,932
August 2007
avatar

CodeBlocks isn't behaving with Allegro at all. At this point I'll continue to try to get it to work, but continue using DevC++ for the moment.

Quote:

What has that got to do with anything?

I've found that my OSS software has a habit of disappearing without my using the uninstaller. It scares me, too, because no one else has access to my workstation.

Quote:

I used KRDC to connect to a windows box and could define my own resolution there. As my monitor went up to 1280x1024 I didn't try anything higher but I bet it would have worked.

No, I'm talking about using a Windows box to connect to a Linux box.

Quote:

I don't lespecially love MS either but I try to not spread FUD

Preaching to the choir there boy. There is very little I say that isn't from experience. The rest of it's usually me being sardonic.

nonnus29
Member #2,606
August 2002
avatar

Quote:

I don't think Allegro works with Borland. Perhaps this support was phased out sometime in the past?

Actually support for Borland compilers was phased out at about the Allegro 2.0 release in 1996. If you read the change control log from back then there was much rejoicing and happy celebration. In other words, Sean hated Borland.

So you can see the Allegro community has a looooooong history of steering people toward gcc (djgpp and mingw).

lordSauron
Member #8,932
August 2007
avatar

Bah. And all this time I thought Allegro hadn't yet done that.

So then why is there still support for MSVC? Who uses that crap? I know for a fact that even MS itself doesn't use it unless it is constrained to do so.

So Borland and Allegro are a loosing match. Problem solved (sort of.) Using DevC++ until CodeBlocks behaves.

Thanks. I hope to be able to use Allegro to actually make something (you know, worthwhile).

BAF
Member #2,981
December 2002
avatar

Visual C++ Express is free and great, despite everyones hatred for MS, which is, I suspect at least for most people here, their way of trying to be "cool."

Quote:

Frankly, I'm not willing to see Microsoft put the Malicious Software Removal Tool into work on my OSS applications. I can feel MSFT growling at OpenOffice and GIMP already.

What does that have to do with anything, and what the fuck are you talking about?

Matthew Leverton
Supreme Loser
January 1999
avatar

Quote:

Actually support for Borland compilers was phased out at about the Allegro 2.0 release in 1996. If you read the change control log from back then there was much rejoicing and happy celebration. In other words, Sean hated Borland.

So you can see the Allegro community has a looooooong history of steering people toward gcc (djgpp and mingw).

And yet 4.2.2 still has support for Borland Builder. ::)

fix bcc32
make

And not to mention support for DMC, MSVC 6,7,8, Watcom, DJGPP, etc. The fact is if there's people or more accurately a person (that means you, as in the person reading this post) out there willing to maintain it, it will be supported. There are no magical elves that do this stuff.

Quote:

What does that have to do with anything, and what the fuck are you talking about?

It's his way of telling us to ignore him.

lordSauron
Member #8,932
August 2007
avatar

Quote:

Visual C++ Express is free and great, despite everyones hatred for MS, which is, I suspect at least for most people here, their way of trying to be "cool."

I have already rejected VC++ for some very good reasons. It's not cross platform. It's not C99 compliant, so code I write there has no way of being enforced to work on other platforms if I switch compilers. I think that VC++ is one of the better C++ IDEs, but the compiler doesn't even begin to measure up to the prerequisites I have of it.

For me, it's not trying to be "cool." For me, it's trying to make a wise decision now so that I don't burn later. The chances of Microsoft making their compiler cross platform... phrased in another way, we have a better chance of God saying that Satan had the right idea. While you may argue that Silverlight might hint a change, I think we all are familiar with Microsoft's Embrace-Extend-Abandon attacks, and that even if the MSFT compiler goes xplatform, it won't stay that way for more than a few years at best.

Quote:

And not to mention support for DMC, MSVC 6,7,8, Watcom, DJGPP, etc. The fact is if there's people or more accurately a person (that means you, as in the person reading this post) out there willing to maintain it, it will be supported. There are no magical elves that do this stuff.

I said I had experience with C/C++, not that I wrote the thing. I'm NOT the person to oversee compatibility with a compiler. I'm still re-acquainting myself with C++ after a three-year-long fling with Java. Nor was I all that great with C++ before I learned Java.

I know that it's not "magical elves" that maintain software, but I'm not guru enough to even begin to address the intricacies of maintaining a wad of code the size and complexity of Allegro.

BAF
Member #2,981
December 2002
avatar

Quote:

I have already rejected VC++ for some very good reasons. It's not cross platform.

Well, strictly speaking, Dev-C++ isn't cross platform either.

Quote:

It's not C99 compliant, so code I write there has no way of being enforced to work on other platforms if I switch compilers. I think that VC++ is one of the better C++ IDEs, but the compiler doesn't even begin to measure up to the prerequisites I have of it.

Are you doing C++ or C? C99 only matters for the most part, IIRC, in C. I, and I'm pretty sure many others, have had no or little issues with that.

Quote:

For me, it's not trying to be "cool." For me, it's trying to make a wise decision now so that I don't burn later. The chances of Microsoft making their compiler cross platform... phrased in another way, we have a better chance of God saying that Satan had the right idea. While you may argue that Silverlight might hint a change, I think we all are familiar with Microsoft's Embrace-Extend-Abandon attacks, and that even if the MSFT compiler goes xplatform, it won't stay that way for more than a few years at best.

Well, the code is cross platform. Who cares about the compiler? Since when does Borland run on Linux? You're not going to burn later for using VC++, because most of the platform specifics you will encounter are there with MinGW anyway. Regular testing of your code on other platforms will make sure it keeps running crossplatform.

lordSauron
Member #8,932
August 2007
avatar

VC++ pushes you towards managed code which needs a runtime to work. I don't want that. Borland adheres more closely to standards, which means that the code will be much easier to port to another compiler (like GCC). The last time I took a tour of MSVC++ it started throwing in all of this code which simply wouldn't work on another platform.

I know enough from Java to know that code that isn't carefully crafted to be cross platform won't be. I don't want to spend three months somewhere down the line porting to GCC in order to get things to run on mac. If I run Borland, the entire codebase is totally ISO standard, so there isn't a problem with stupid compile errors if I try to switch compilers. If I run GCC to begin with, I suffer from a less advanced IDE, but gain instant portability if I'm careful in how I build the application.

Matthew Leverton
Supreme Loser
January 1999
avatar

So Microsoft throws in code in your projects and deletes random stuff from your computer, and you still use Windows? The next time a UFO lands in your back yard, ask the aliens exactly just how we staged the moon landing.

 1   2 


Go to: