Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » How to use allegro with DJGPP and RHIDE?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
How to use allegro with DJGPP and RHIDE?
Basix 9
Member #3,994
October 2003

Hi I having been using C/C++ for quite some time. I used the TC compiler during that time. But I want to move on to better gfx progging environments. Please tell me whether these facts are correct:
1. DJGPP is a compiler
2. RHIDE is an IDE
3. Allegro is a gfx lib

Also I had a few questions:
I have downloaded DJGPP from www.delorie.com and RHIDE from www.rhide.com(I want to work with DOS environment, will rhide work well with it?).

I dont know anything about setting up the compiler and ide. How do I do that?

After I finish setting these two things how do i get allegro to work with it?

Please advice =(

Thanks,
Basix

P.S.: BTW I am no newbie to progging =P

Fladimir da Gorf
Member #1,565
October 2001
avatar

3. Is actually incorrect, Allegro is a gaming lib ;) It doesn't only provide a gfx wrapper, but also input, image loading, sounds and other stuff.

Quote:

I dont know anything about setting up the compiler and ide. How do I do that?

Usually it's just matter of unziping the archives and maybe setting some global variables... About installing allegro, you could read the installing docs, DJGPP specific. And you should think twise if DOS really is the right environment/target platform for you. As you may already know, allegro works with any gcc compiler, and also with MS Visual C++.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

razor
Member #2,256
April 2002
avatar

first off, why do you want DOS support??

rhide should work with djgpp, all the versions of djgpp I ever used came with rhide setup and working, but have you tried looking at the rhide docs??

for allegro install it like normal then use rhide to add it to the linker options.

your facts are basiclly right, but allegro is a game proggraming libary, not just gfx. Hope that helps, I still think that linux or windows would be a better platform though.

EDIT: I got beat to it!

Whoooo Oregon State University

Basix 9
Member #3,994
October 2003

Well, I want to try out with DOS first and then Linux. If I am correct once I code a program I can just compile the program for whichever environment I want(atleast for DOS or Linux). That is if I dont use any operating system specific functions. Am I correct?

Edit: I got rhide working. Now how do i setup DJGPP and allegro:)?

gnolam
Member #2,030
March 2002
avatar

Quote:

Well, I want to try out with DOS first and then Linux. If I am correct once I code a program I can just compile the program for whichever environment I want(atleast for DOS or Linux). That is if I dont use any operating system specific functions. Am I correct?

Well, cross-compiling can be tricky, but the source should at least be portable, so in effect: yes.

Quote:

Edit: I got rhide working. Now how do i setup DJGPP and allegro?

Setting up DJGPP:
The environment variable "DJGPP" should be set to point to where your djgpp.env file is, e.g.
set DJGPP=c:\djgpp\djgpp.env (or wherever you installed DJGPP)
You also have to add the \bin directory to your path, e.g.
set PATH=C:\djgpp\bin;%PATH%
(I recommend you add these two lines to your autoexec.bat )

To compile and install Allegro:
Step 1) Unzip Allegro to the directory of your choice (make sure to preserve subdirectories).
Step 2) Go to your Allegro directory (for example "cd \djgpp\allegro")
Step 3) Type the following:

fix djgpp
make
make install

If there is any step here or part thereof you don't understand, feel free to ask about it and I will try to explain :)
[EDIT]
Oh, and welcome to Allegro.cc :)

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Basix 9
Member #3,994
October 2003

Ok, I have gotten rhide working, downloaded djgpp and installed it. I also set the environmental variables like you told me. But when I try to compile this simple code it doesnt work:

#include<iostream.h>

void main()
{
cout<<"Hello World"<<endl;
}

When I compile rhide gives me an error - "Dont know how to build test.o from ...<and some path>

Whats wrong?

Kitty Cat
Member #2,815
October 2002
avatar

He forgot to mention you need to set DJDIR to your djgpp directory too, using unix-style forward slashes:
set DJDIR=C:/DJGPP

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

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

#include <iostream.h>

Bad dog. You include <iostream>, not <iostream.h>.

The exact error message would be nice too.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

razor
Member #2,256
April 2002
avatar

are you sure you got rhide working correctly? sounds like you just got it to open, but its not finding/using djgpp. There should be some setup that needs to be done, all that information should be in the docs. or it could be as everyone else says that djgpp is not setup right so you should read those docs too. and quick question, are you running pure DOS? or through windows? because if its win2000 or winXP then its not going to work well at all.

Whoooo Oregon State University

Basix 9
Member #3,994
October 2003

I am not running pure DOS. I am using WinME in Dos Box.

BTW I did read the installation docs and added the PATH and other things to my autoexec.bat. I also used msconfig.exe to double check. Nothing is wrong with my configuration. Am I supposed to setup any paths in RHIDE? Like compiler path and all?

Kitty Cat
Member #2,815
October 2002
avatar

What happens if you type 'gcc -v' at the command line? The error you showed seemed to be using C++ code.. what do you get with 'gxx -v'?

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

Basix 9
Member #3,994
October 2003

I get the following output with gcc -v:

Reading specs from c:/djgpp/lib/gcc-lib/djgpp/3.32/specs
Configured with: /devel/gnu/gcc/3.3/gnu/gcc-3.32/configure i586-pc-msdosdjgpp --
prefix=/dev/env/DJDIR --disable-nls
Thread model: single
gcc version 3.3.2

and with gxx -v:
Reading specs from C:/DJGPP/BIN/../lib/gcc-lib/djgpp/3.32/specs
Configured with: /devel/gnu/gcc/3.3/gnu/gcc-3.32/configure i586-pc-msdosdjgpp --
prefix=/dev/env/DJDIR --disable-nls
Thread model: single
gcc version 3.3.2
C:/DJGPP/BIN/../lib/gcc-lib/djgpp/3.32/collect2.exe c:/djgpp/lib/crt0.o -LC:/DJ
GPP/BIN/../lib/gcc-lib/djgpp/3.32 -LC:/DJGPP/BIN/../lib/gcc-lib -Lc:/djgpp/lib -
Lc:/djgpp/lib/gcc-lib/djgpp/3.32 -Lc:/djgpp/bin -Lc:/djgpp/lib -LC:/DJGPP/BIN/..
lib/gcc-lib/djgpp/3.32../../.. -Lc:/djgpp/lib/gcc-lib/djgpp/3.32/../../.. -lst
dcxx -lm -lgcc -lc -lgcc -Tdjgpp-x.djl
c:/djgpp/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to `_main'
c:/djgpp/lib/libc.a(crt1.o)(.text+0x404):crt1.c: undefined reference to `_main'
collect2: ld returned 1 exit status

ImLeftFooted
Member #3,935
October 2003
avatar

[edit] Nevermind i think i was wrong

Carrus85
Member #2,633
August 2002
avatar

Quote:

I am not running pure DOS. I am using WinME in Dos Box.

Um, Mingw anyone? Sorry, I have never been able to get DJGPP to function correctly for some reason. Besides, you get that nice Direct-X, compatible windows output :D.

Mingw32- The Hax0r Compiler for Microsoft windows!
Dev-CPP- okay IDE, butI wouldn't personally suggest using it.
SCITE- Great Editor that does everything you would ever want it to, in a nice, easy to use self-installing package.

Basix 9
Member #3,994
October 2003

help me! Rhide isnt working with DJGPP. I have set up the djgpp variables but rhide simply wont work! I tried using Dev C++ it works with DJGPP but gives too many errors :'(

Fladimir da Gorf
Member #1,565
October 2001
avatar

Quote:

I tried using Dev C++ it works with DJGPP

Dev-C++ works with DJGPP?! It's supposed to use either MingW32 or Cygwin compiler. Get one of those (MingW32 should be included in the Dev-C++ installation).

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Basix 9
Member #3,994
October 2003

Ahem...I dont want to sound like a big mouth but you do have an option to use a different compiler in Dev C++ ;D.

Fladimir da Gorf
Member #1,565
October 2001
avatar

Ooh, it has envolved. Well, that nice feature doesn't seem to be working if it gives a flood of errors. Why not using a standard windows compiler?

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Basix 9
Member #3,994
October 2003

Standard Windows Compiler? Please enlighten me about this.

Plz check out my post on String Data Type =P

Fladimir da Gorf
Member #1,565
October 2001
avatar

There's the "a" included. A standard windows compiler, not The Standard Windows Compiler. ;) Just anyone of them, like MingW or VC++.

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

Trezker
Member #1,739
December 2001
avatar

1. get mingw

2. get a bunch of IDEs to try out
Visual-mingw 0.43a (simple, very simple)
dev-c++ (has some problem IIRC)
MSVC (I'm anti MS...)
...
3. Install as instructed by packages.

4. Make sure you IDE and compiler works

5. get and install allegro

Report back to us ;D

Basix 9
Member #3,994
October 2003

Tell me, will MSVC allow me to use any compiler? Even DJGPP?

miran
Member #2,407
June 2002

Why exactly do you need to use DJGPP? DJGPP is old (edit: actually it isn't, the latest version is a lot newer than MSVC6 but whatever) and programs compiled with it won't work reliably under newer versions of Windows. MinGW OTOH is the same thing as DJGPP except it is for Windows and it compiles Windows programs...

--
sig used to be here

Basix 9
Member #3,994
October 2003

Ok, But right now I want to just develop for DOS. You havent answered my question. Does MSVC 5 allow me to use any compiler?

miran
Member #2,407
June 2002

Most likely no. But why do you want to develop for DOS? Is there a specific reasons for this or are you just afraid of Windows and Linux? Because developing for Windows with MinGW is almost exactly the same as developing for DOS with DJGPP...

--
sig used to be here

 1   2 


Go to: