I'm scared of MinGW, mommy!
23yrold3yrold

Too many "MinGW is giving me problems" posts here. Is it much trouble to get Allegro working with it? I downloaded the latest version and it works fine with my stadard C++ programs, but is Allegro hard to get up and running for it? Or is it enough to type
fixming
make
makeinstall
I like the idea of dll's and AllegGL, but at what price of time and sanity?

Todd Cope

I followed the instructions in the readme and it worked perfectly for me. No problems.

23yrold3yrold

Which readme? Allegro's?

Todd Cope

Yep. I just went step-by-step through the readme.mgw file.

Bob

You should use Mingw 1.01. I just downloaded it, deleted the old Mingw dir (so I can do a fresh install), unzipped, then followed the instructions in allegro/readme.mgw and was able to compile Allegro within 10 minutes.
(it helps to have a high-speed connection to the net too )

Bob

Frankly, most of the Mingw related posts are due to people not reading the instructions, or trying to make Allegro work with DX8 SDK or a very old Mingw version, or an incomplete one.

23yrold3yrold

I downloaded the latest DX (that'd be 8) and Dev-C++ a few weeks ago. Is the version of MinGW with Dev-C++ good enough, and can I not make Allegro using DX8? Can I even get DX7 anymore?

Bob

You can get the DX7 mini-SDK here.

I don't know which version DevC comes. Try doind gcc -v in the command prompt to see which version of gcc is being used.

23yrold3yrold

gcc -v gives me DJGPP stats ;)

StevenVI

Remove your DJGPP directory from the path, and type it in your Dev-C++/bin directory.

-Steve

23yrold3yrold

And what is "The Path"? I ran into the same term trying to get NASM working.

Bob

In Windows 95/98 or DOS, open your autoexec.bat file and look at the line: PATH = (something)
This "command" tells DOS where to find exectuables, so you don't have to type c:/progra~1/micros~2/progra~1/foo.exe.
If you're using Windows NT/2000/ME, it's in the Control Panel/System/Advanced/Environment.

23yrold3yrold

Not really a help. I got MinGW by downloading Dev-C++, and the site says it's version MSCVRT 2.95.2-1. Must I use 1.01, or just not an older verison than that?

Hmm ... the Dev-C++ site says it can be used with Cygwin ... I wonder if I can use it for my Dreamcast work ...

Bob

Mingw is composed of several parts. The run time library (libc, or msvcrt in Windows) has a particular version number, gcc has another version, as as even another version, etc.

Mingw 1.01 is the package of all these different programs. Mingw 1.01 actually comes with gcc 2.95.3-5.

23yrold3yrold

So am I good? Do I need to download a new MinGW and find a way to combine it with Dev-C++ (I hate running off command prompts, mostly because I can't make that work either)?

I asked in my first post "... at what price of time and sanity? " I think I'm getting my answer ....

Bob

I think you should update your version of Mingw. I don't know where DevC stores it, but you should be able to overwrite it with the newer build.

23yrold3yrold

I'll give it a try. Then where do I install that DX 7 SDK? And after all that:
fixming
make
make install
will do it for me?

Bob

I think it's "fix mingw32" for 3.9.37+.

You should unzip the libraries (*.a) in mingw/lib, and the includes (*.h) in mingw/include.

23yrold3yrold

Alright, I'll go find the latest MinGW and take a shot at installing it into Dev-C++. (crosses fingers) ....

23yrold3yrold

No dice. I tried overwriting all the MinGW stuff in Dev-C++ with the new stuff, and now it complains that cpp0.exe isn't in C:/Dev-C++/bin/, which it clearly is.

Well, it's officially crossed the line of aggrevation, so hell with it. Maybe I can get Dev-C++ to work with Cygwin; that'd make my DC programming easier.

George Foot

I hate integrated environments. :) It looks to me horribly like Dev-C++ is getting in the way here. I've found Mingw itself pretty simple to set up, from the readme.mgw instructions. That was a few versions ago, so I don't know if much has changed. I was following the Mingw32-only instructions (there were no Dev-C++ instructions back then I think), so perhaps that's why it worked better.

23yrold3yrold
Quote:

I hate integrated environments.

I can't get commands from the DOS prompt to work either. For DJGPP I mean. So no command line, and no IDE. Call me SOL ....

Bob

23yrold3yrold: What do you the command line doesn't work? Do you get a "bad command or file name" type of error? If so, then its your path; you need to make it point to the compiler's dirctory (as per the Mingw and DJGPP installation instructions).

23yrold3yrold

When I installed DJGPP, I added those two lines to my Autoexec.bat. But I got "bad command or file name" last time I tried. But I tried again just now, and it worked OK. Go figure ::)

So if I installed the latest MinGW by itself so it ran off the DOS prompt, threw the DX7 libs in mingw/lib, threw the includes in mingw/include, did the fix/make/make, I'd be golden? Would that interfere with DJGPP (would I have to remove those lines from Autoexec.bat, or does mingw use different commands)? And as an added bonus, when I install Cygwin, is that going to provide similar problems? I think all 3 compilers are gcc ....

Goodbytes

Bah. Don't install Cygwin just because you want Dev-C++. Really, I don't knwo what the problem is, I downloaded Dev-C++ and Allegro 3.9.37 and they work together perfectly. Just follow the instructions in readme.mgw... and make sure to really follow them ;) And by the way, cpp0.exe shouldn't be in your dev-c++ bin directory because cpp0.exe is a new program, found only AFAIK in the newest builds of gcc, which dev-c++ doesn't use. Also, make sure to make the Dev-C++ directory C:/DevCpp/ or something instead of C:/Dev-C++/, because the latter will interfere with some gcc tools(the '-'s confuse gcc).

Goodbytes

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.

23yrold3yrold

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).

23yrold3yrold

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)

23yrold3yrold

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.

23yrold3yrold

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?)

Goodbytes

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 ;)

Matt Smith

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

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

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.

Matt Smith

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

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-)

Matt Smith

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

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?

Peter Hull

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

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..

Matt Smith

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

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 ]

Bob

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

23yrold3yrold

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

Matt Smith

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

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

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?

Matt Smith

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

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 :)

Thread #125917. Printed from Allegro.cc