A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » General
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

MinGW. GCC on W98?



 
 
Thread Tools Display Modes
  #1  
Old March 20th 12, 02:40 PM posted to microsoft.public.win98.gen_discussion
Lostgallifreyan
external usenet poster
 
Posts: 1,562
Default MinGW. GCC on W98?

Does anyone know of a Win32 binary that does work on W98? I found a late 7Z
package that claimed x86 support intended for Win32, but it would not run in
'DOS mode'. Meaning it couldn't even tell I was in a Windows session!

I have the Dev-CPP-supplied MinGW but it's older, and I need to try a newer
one because I'm exploring a file dialog API call. Code that compiles and runs
fine using TCC crashes COMDLG32.DLL when compiled by GCC v3.4.5, even though
it compiles with no errors or warnings.

There's only one thing to try, that's a newer version, because this really
DOES look like a bug, and not in my code for once. But right now I can't find
a simple download of a MinGW binary that I can be sure will run on W9X. I
could download several tens, maybe hundreds of megabytes, from all and sundry
out there and draw blank after blank, so I could really use some help finding
one that works.

I may be able to find one inside other tools, like 'DialogBlocks' or
whatever, but this is like shooting blind, hoping to hit something, anything
at ALL. If you know somethign better than this, please post. I'd use the one
from Dev-cpp if they updated it, but I don't think they ever do now.
  #2  
Old March 20th 12, 03:23 PM posted to microsoft.public.win98.gen_discussion
Lostgallifreyan
external usenet poster
 
Posts: 1,562
Default MinGW. GCC on W98?

Not so urgent now.

Turns out that TCC has the quirk, not GCC, because TCC (helpfully) allows
string literals to be passed at times other systems demand a pointer to a
buffer or char array. Helpful it may be, but misleading if we come to expect
it from systems that cause cryptic crashes when we attempt it.

Even so, if anyone can point me to a new (ideally small) MinGW binary install
guaranteed to work well on W98, please post.

MUST be binary, not source... I doubt I can compile it, and even if I could
it might be risky doing it with an earlier compiler I don't know enough to
trust either it or me.
  #3  
Old March 20th 12, 03:51 PM posted to microsoft.public.win98.gen_discussion
Lostgallifreyan
external usenet poster
 
Posts: 1,562
Default MinGW. GCC on W98?

Ok, I think this just became urgent again.

The SAME code that just ran, caused a crash! THis only happens with GCC. TCC
doesn't care how I pass the data, it just works, GCC worked ONCE, I changed
it to see if I could learn more, then its compiled output crashed. I
reinstated the SAME WORKIGN CODE, (it was still on the clipboard!), but GCC's
output crashed, when it didn't before. So not only is it DEFINITELY a bug,
it's not even easily repeatable, and clearly exists outside my iown context.
I have to find a proer working GCC for W98, ASAP. Please help if you know
how.
  #4  
Old March 20th 12, 04:58 PM posted to microsoft.public.win98.gen_discussion
Lostgallifreyan
external usenet poster
 
Posts: 1,562
Default SOLVED. Was: MinGW. GCC on W98?

Lostgallifreyan wrote in
:

I have the Dev-CPP-supplied MinGW but it's older, and I need to try a
newer one because I'm exploring a file dialog API call. Code that
compiles and runs fine using TCC crashes COMDLG32.DLL when compiled by
GCC v3.4.5, even though it compiles with no errors or warnings.


In case anyone finds this in some web archive while being hit with this
problem themselves, here's the answer.

Context:
OPENFILENAME ofn;
ZeroMemory(&ofn,sizeof(ofn));

In many examples, that ZeroMemory bit is omitted. As TheForger says in his
tutorial, it is wise to include it, as some API's do not like to find unused
bits of structs containing data they shouldn't.

It turns out that TCC is polite about this, it zeros all the elements in the
OPENFILENAME struct when creating it, but GCC won't. The ONLY reason I ever
saw code compiled by GCC run at all without this (and also the reason it was
eratic and rare) is that SOMETIMES it might be lucky enough to be creating
the struct in a bit of RAM that happens to have nothing but zeros in it.

I'd still like a newer version of GCC, but I won't be relying on it to do
this. ALWAYS do ZeroMemory on a struct or array if in doubt of what might
otherwise be in there.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:32 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.