DLL Hell or something
I'm a Linux guy, so please be gentle with me.
I wrote a GUI application using wxWindows and ported it to Windows in an hour or so, good stuff. I compiled it on Windows 2000 with the MinGW and MSYS combination and it works a treat. I built the wxMSW library as a DLL and distributed the executable and the DLL.
A friend of mine has tried it on Windows 98 SE and it causes an error once he starts using the program proper. That means the program starts, he can go into all of the dialog boxes that are available but once he loads the data it causes an error. I think it's a segmentation fault, but I can't be sure as its a German version of W98SE.
It sounds like the problems start once it tries to do any graphics work.
My question is therefore what else do I need to distribute in order to make it work, if anything. The program is basically sound as it runs all day under Linux and Windows 2000. what else do I need to do ?
If anyone wants to take a look at it, its on my web page http://www.qsl.net/g4klx under Software and its called UKW Tools. All source and the Windows files can be found there.
TIA (I hope)
whattimeisiteccles
Tuesday, January 13, 2004
dependency walker says WXMSW242.DLL requires MSVCRT.DLL.
Do they have that?
Tuesday, January 13, 2004
> dependency walker says WXMSW242.DLL requires MSVCRT.DLL
The EXE wouldn't load if a required DLL were missing.
I'd say you need to look at the fault using a debugger (or, FAR more tediously, sprinkle the program with printf statements until you've isolated the line of code that's crashing). Perhaps you don't have a copy of Win98 yourself (so you can't reproduce the problem yourself with a debugger). I don't know how to debug Win98 remotely: does it have a drwatson.exe or drwtsn32.exe, which can generate a crash dump?
Christopher Wells
Tuesday, January 13, 2004
I always compile on 98 and have had mysterious problems, such as yours, disappear.
Lazy? Yes, but effective.
Tuesday, January 13, 2004
Get VMWare (available for Linux) and install Windows 98 SE to test it.
Wayne
Tuesday, January 13, 2004
You've got to test with every possible OS, and, if the problem's grpahics, think of testing with different video cards.
It won't be .dll hell; that happens when a program overwrites a later system .dll with an older one; as your .dll will be the last one loeaded you won't have that problem.
So, anyway, your one hour port to Windows will now require something like a week or maybe a month's testing.
This is the problem with testing for Windows. With Linux, when a program doesn't work properly because of a configuration change, the users go off and read couple of thousand man pages, compile half a dozen library files, recompile the kernel, and rewrite your app if it still has a problem.
Windows users are bastards: they expect you to fix all these problems :)
Stephen Jones
Tuesday, January 13, 2004
“The EXE wouldn't load if a required DLL were missing.”
That is not true. There is such thing as lazy module loading and programmatic module loading.
coresi
Tuesday, January 13, 2004
> dependency walker says WXMSW242.DLL requires MSVCRT.DLL
This is one of the c runtime dll's. If the version of the runtime is earlier than your dll was built with, that could be the problem. You can download an update for these runtimes from Microsoft. Sorry don't have the url handy.
Ken McKinney
Tuesday, January 13, 2004
Get Windows 98 SE German and debug it yo' bad self.
runtime
Tuesday, January 13, 2004
Just off the top of my head it seems unlikely that it would be anything like a missing DLL. Despite things like lazy loading, it woulnd't usually produce anything quite as nasty in my experience.
Nice goon show reference by the way! :)
Andrew Cherry
Tuesday, January 13, 2004
This is a common problem for Windows developers. There are countless examples of the same code doing very different things on different version of Windows
The reason is, even though the WIN32 interface is nearly identical on each versions of Windows, the underlying implementation can be very different.
The way around this is to try to identify the offending code and then re-write the code in such a way that all the version of Windows agree it is correct.
Jussi (www.zeusedit.com)
Tuesday, January 13, 2004
I've had something similar with wxWindows. When I uninstalled VC6, my wxWindows program stopped working. I had to recompile it with VS.NET to make it work.
Try this:
http://www.dependencywalker.com/
Run it on the offending PC, and get it to look at the offending EXE.
In my case, seems wxWindows is using APPHELP.DLL, whatever that is. I suspect this is an artefact of the way I compiled the DLL, because after compiling it with VS.NET wxWindows still depends on APPHELP.DLL, and APPHELP.DLL still doesn't exist, but the program loads fine...
Insert half smiley here.
Tuesday, January 13, 2004
Oh, and when I load my program it crashes rather than saying anything about missing DLLs.
(Actually, it pops up the windows text mode debugger, but I'm pretty sure it just crashed before -- indeed, if I "g" then it crashes (in the debugger) immediately.)
Insert half smiley here.
Tuesday, January 13, 2004
Thank you for all of you who replied apart from the one rather childish one about Linux. There's always one isn't there ?
To take it one step further, lets say that its msvcrt.dll that is causing the trouble, is the solution to then ship my copy of msvcrt.dll with the rest of the files ? Isn't that a little dangerous ?
Can my friend test it, by putting a copy of my dll in the same directory as the application and my wxMSW dll and leaving his normal one alone. What do the professionals do ? I don't have a W98 machine available and I am not sufficiently bothered to get one either.
I would like to distribute a binary version for Windows if it isn't too much bother. Enough people are interested in it to make it worthwhile.
whattimeisiteccles
Wednesday, January 14, 2004
You're right about not trying to overwrite the system .dll. Win Me, W2K and XP won't let you overwrite their version of the file, and you will quite likely break somebody else's program if you overwrite the Win 98 one; this overwriting of .dlls is what .dll hell is all about.
If it's freeware, then you obviously don't want to go to the expense of buying multiple copies of Win 98 (and yep, each language version has its own problems) just to test it.
I would simply say it only works on win 2K and Win XP. Why risk your reputation?
The Linux comment was meant as a joke, though not without a grain of truth.
Stephen Jones
Wednesday, January 14, 2004
Putting your copy of msvcrt.dll in the application directory is unlikely to prove anything since windows will almost certainly already have it loaded.
The fastest way to find out if that's the problem is to have your friend download the latest C/C++ runtimes from...
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q259/4/03.ASP&NoWebContent=1 and install them.
Problems with the C/C++ runtimes are almost never due to the runtime version on the machine being later than the application was built with. Having an earlier version of the runtime can and frequently does cause problems.
Ken McKinney
Wednesday, January 14, 2004
Recent Topics
Fog Creek Home
|