Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » I'm scared of MinGW, mommy!

This thread is locked; no one can reply to it. rss feed Print
 1   2 
I'm scared of MinGW, mommy!
Goodbytes
Member #448
June 2000
avatar

Ah, look. Here I am, replying without reading the whole thread first... anyways, what I meant to say was that you should use the version of mingw32 that comes with dev-c++. bah.


--
~Goodbytes

23yrold3yrold
Member #1,134
March 2001
avatar

Cygwin is for Dreamcast programming. :) Bob had me going that I needed to upgrade my MinGW. So the Dev-C++ version is good enough? I'll give it another shot (though by now I'm quite sure I forgot why I care).

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

23yrold3yrold
Member #1,134
March 2001
avatar

Well from the look of it I had to temporarily disable DJGPP to get Dev-C++/MinGW to compile Allegro, but now I get a parse error in ddraw.h. Two errors, actually; both "parse error before 'HMONITOR', in these lines:
code:
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR);
typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR);

(sigh)

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

23yrold3yrold
Member #1,134
March 2001
avatar

And now I tried straight MinGW (no Dev-C++) to see if I could get the library out of it, and make gives me "Bad command or file name". Can I, like, not have more than one gcc thingamabob on my computer at any given time? I had to take the DJGPP line out of Autoexec.bat just to get MinGW as far as I did ....

Installing Cygwin is going to be a riot. I can feel it.

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

23yrold3yrold
Member #1,134
March 2001
avatar

Hmmm ... since all this crap uses gnu gcc tools and binutils and all this stuff, can I get Dev-C++ to cross-compile for the Dreamcast, given the right ports of gcc so it compiles for the Dreamcast's SH4 processor(ports that I have)? I'm going to piss around on gcc's home page and learn about this stuff; you guys seem to know a lot about it from somewhere (how did goodbytes know cpp0.exe was new? How? HOW?)

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

Goodbytes
Member #448
June 2000
avatar

Oh, I'll tell you how...

You see, I recently updated my version of mingw2. Then I noticed a program called 'cpp0.exe.' I thought, "hey, that's new." And that's how. :)

but, seriously, you rally shouldn't be getting ddraw.h errors if you got the new DirectX headers as talked about in readme.mgw. Just make sure that you PATH points to C:\DevCpp\ and not C:\DJGPP\, at least while you're compiling Allegro. Just do this by typing

path C:\DevCpp

on the command line, and then fix mingw32 + make + make install. Make sure not to open another DOS-box for doing any of this, because as soon as you close your DOS box, the path setting will revert to normal.

I mean, it can't really be that hard, can it? I'd come over to your house and show you, but you live kinda far away. Well, not really far... anyway, this is getting pointless ;)


--
~Goodbytes

Matt Smith
Member #783
November 2000

mingw32 and djgpp are both versions of gcc, so you need to have just one on the path

You seem to have found this out for yourself

typing SET will show you your environment settings

typing SET PATH=C:\DevCpp;%PATH% will add C:\DevCpp to the 'front' of your path.

these settings will only last for the DOS session, which is why they are set in autoexec.bat

George Foot
Member #669
September 2000

I haven't used Mingw32 much, but I created shortcuts on my desktop to launch a command prompt with the path set properly for Mingw32 development. I found this the simplest way of having both compilers installed on the same PC, and you can then be sure that one won't get in the way of the other.

But when you launch dev-c++ you probably need to have the path set correctly too -- I don't know much about that.

23yrold3yrold
Member #1,134
March 2001
avatar

Nah, Dev-C++ doesn't need the path set. I no longer care for Allegro for Windows (far too much trouble) but I got wind I can use gcc tools ported for the Dreamcast in Dev-C++ or even RHIDE, so I'm going to keep screwing with this and just hope I don't do any permenant damage along the way.

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

Matt Smith
Member #783
November 2000

Yes I have a PIF file for rhide, just so it starts with 50 lines in my favourite font. I would have 2 of these if I used MinGW32
Chris:
that will make THREE (3) versions of gcc, I recommend you learn what PATH means or you will get in a right mess.
when you type a command, such as FORMAT (don't do it now ) what DOS does is
a) looks in the current directory for FORMAT.COM FORMAT.BAT FORMAT.EXE and one more which I forget probably SYS or CMD
b) If it doesn't find one, it then looks in all the dirs in the PATH string, starting at the beginning until it finds a match
Now, all the gnu tools like gcc, as, rm, echo etc. are all in C:\DJGPP\BIN but these are DJGPP only versions.
In MINGW32\BIN there are the mingw32 versions
IN DREAMCAST\BIN there are Dreamcast versions
In NotYaroze\bin there are the PSX versions
etc.

now when DevCpp calls mingw32, it will just call 'gcc' which it will expect to run the one in ming32/bin. It won't do this if it finds gcc.exe in djgpp/bin first.
the C:\windows;C:\windows\command part of the path is needed for the DOS & Windows commands

23yrold3yrold
Member #1,134
March 2001
avatar

Well, that confirms what I figured, but it doesn't really tell me how to fix it. Dev-C++ still doesn't require any paths set, though, so if I find some way to overwrite all the MinGW GCC tools with the SH4 ports (no, I'm not blindly trying it; I'm doing some research on dcdev and gnu tools first) then I may have a shot. I can live with 2 gcc's; Dev-C++/Dreamcast and RHIDE/DJGPP. I note, however, that RHIDE requires DJGPP's path set or it won't work.

I wonder if I can have 2 Dev-C++'s; one for MinGW and one for SH4 compiling ..... 8-)

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

Matt Smith
Member #783
November 2000

With little batch files
code:
SETDC.BAT
COPY /DEVCPP/CONFIG.DC /DEVCPP/CONFIG
SET PATH=C:/GCC_DC/BIN etc. if needed

SETMW.BAT
COPY /DEVCPP/CONFIG.MW /DEVCPP/CONFIG
SET PATH=C:/MINGW-32/BIN etc.

I made up all the filenames of course but do you get the idea? You make custom commands to change the environment to that needed for your target.

you can put these batch files in c:\windows\command so they will run whatever mode you are already in.

23yrold3yrold
Member #1,134
March 2001
avatar

I'm a bit fuzzy on what a bathc file even is. Incidentally, here's a reply I (finally) got from the Bloodshed Software forum about mixing Cygwin and Dev-C++:
quote:
Don't know about the cygwin thing but you can have multiple include paths in your autoexec.bat by separating multiple paths with semi-colons(';')
in the SET PATH command eg.
SET PATH=c:\compiler1;d:\compiler2;c:\compiler3%PATH%
Or you could use batch files: just make sure you have the SET PATH command in each batch file set to your chosen compiler's path.

Hey, cool; he had the same idea you did. I think. So I can have DJGPP/RHIDE, MinGW/Dev-C++ (which still won't compile Allegro) and Cygwin/Dev-C++, and all I need to do is run some batch file before using the IDE/compiler?

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

Peter Hull
Member #1,136
March 2001

My experience: windres crashes my WinME system, big style, every time I try to run it. This is with MingW 1.0. Anyone else had this?
Pete
Follow up: In fact this is a known bug: the cause is interaction with antivirus software.
Pete
[ August 14, 2001: Message edited by: Peter Hull ]

Derezo
Member #1,666
April 2001
avatar

I couldn't get the most recent version of allegro to work with the latest version of MingW or Dev-C++. However, I got the last version of allegro to work with both..

"He who controls the stuffing controls the Universe"

Matt Smith
Member #783
November 2000

Chris:
batch files (.BAT) are simply DOS scripts.
batch is short for "batch-job process" which is a manufacturing industry term
Yes you have the idea
You say "I'm going to do Dreamcast today" and type
SETDC
or if you are in bash (because you are training for Linux, or become a script junkie)
./SETDC.BAT

And you are set up and ready to go
[ August 12, 2001: Message edited by: MattSmith ]

23yrold3yrold
Member #1,134
March 2001
avatar

OK, I tried rem'ing out the two lines in Autoexec.bat for DJGPP, and tried making a DJSET.BAT with these lines:
@ECHO OFF
SET PATH=C:\DJGPP\BIN;%PATH%
SET DJGPP=C:\DJGPP\DJGPP.ENV
C:/DJGPP is of course my main folder. So I restart, then run DJSET.BAT, then try RHIDE. Gives me warnings all over the place. How should I do this?
[ August 15, 2001: Message edited by: 23yrold3yrold ]

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

Bob
Free Market Evangelist
September 2000
avatar

What kind of warnings? Are you running Win NT or 2000?

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

23yrold3yrold
Member #1,134
March 2001
avatar

Just opening RHIDE gives me a window saying 'Warning: your DJGPP environment is not set' and so forth. And I'm running Win98.

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

Matt Smith
Member #783
November 2000

IMPORTANT
use the full path in SET PATH= in the BAT files, or you will still have the other/bin on the path from %PATH%
I think you should have forward slashes in DJDIR and DJGPP but check the docs. I have mine all lowercase too, MingW may care about this.
AND
These variables only last as long as the DOS session, unless you put them in AUTOEXEC.BAT and reboot.
So you want to put RHIDE in the .BAT too, if you run the .BAT directly from Windows.
You can even put a CD \MyDJGame before loading RHIDE so it automatically loads your project
[ August 16, 2001: Message edited by: MattSmith ]

Matt Smith
Member #783
November 2000

Another thing, which version of RHIDE are you running ?
1.4 by Robert Höhne (original DOS version)
1.4.7.8 by Andris Pavenis (which works on Linux too)
The both work fine for me in Win98, but I believe they have different small niggles with the environment and other compilers.
I think the debugger worked better in 1.4, but it could just be the bugs I have now are crashing harder

23yrold3yrold
Member #1,134
March 2001
avatar

RHIDE ver. 1.4.7.8.

What do you call the FULL path? C:\DJGPP\bin is the full path.

And what line do I add to the batch file to launch RHIDE?

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

Matt Smith
Member #783
November 2000

When I say FULL path I mean you have the WINDOWS and WINDOWS/COMMAND folders in it too, so that DOS can work.
%PATH% will add the existing definition to the end so it keeps getting longer if you change modes often. It will also leave the 'other' gcc on the path.
You can put whatever commands you like in a batch file, plus some special commands.
It saves you having to type several things every time you want to do something.
You can put RHIDE or DEVCPP in the batch file like this. I have not called them set??.bat as they start the program and do not reurn until the program has exited.
each line is the same as the command line you type to start the program. I do not know devcpp, but if you type "RHIDE myprog.gpr" then it will start and load this project if it is in the current directory.
RHDJ.BAT

SET PATH=C:\DJGPP\BIN;C:\WINDOWS;C:WINDOWS\COMMAND
SET DJGPP=C:/djgpp/djgpp.env
SET DJDIR=C:/djgpp
CD \myproject\dosversion
RHIDE djgame.gpr

DEVDC.BAT

COPY \DEVCPP\CONFIG.DC \DEVCPP\CONFIG
SET PATH=C:\GCC_DC\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND
CD \myproject\dcversion
DEVCPP dcgame

DEVMW.BAT

COPY \DEVCPP\CONFIG.MW \DEVCPP\CONFIG
SET PATH=C:/MINGW-32/BIN;C:\WINDOWs;C:\WINDOWS\COMMAND
CD \myproject\winversion
DEVCPP mwgame

There! Now Chris can you tell me exact command for starting DEVCPP with a project loaded so I can make these accurate?

I think I will try RHIDE first when I test MingW32, because I started on Turbo C++
[ August 17, 2001: Message edited by: MattSmith ]

snake eyes
Member #933
January 2001

I use Dev-C++ with allegro. However I use cs_mingw_0.4 to compile allegro first. I can't get it to compile with mingw32 that is shipped with dev-c++. I can't remember the website that u can get the version of mingw32 I use but u should be able to search through the forums and find it. That's where I got it from in the first place. some kind chap posted a link in an earlier thread :)

 1   2 


Go to: