Thanks for the info.
And a little more information from my side:
1. The app is written entirely in C.
I have placed all required libraries in the same directory as the
application itself. In fact, I now see that there are no MinGW libraries
there, so no MinGW dependencies exist.
The libraries I have included are mine and GTK+ and friends (gdk, glib,
gobject, gthread, pango, gtk).
I also had to include the 'etc' directory from GTK+ to find the gdk
pixbuf loader and the pango modules. Is this correct?
I also had to include the 'lib/pango' directory from GTK+ to find the
fonts. Is this correct?
My app is multi-threaded, so I tried also including mingwm10.dll in the
execution directory, but this didn't help. :(
I can't reproduce the crash in gdb because in gdb (as well as directly
from an MSYS command line) it runs fine.
It only crashes at startup when I double-click in Explorer or when I
execute from a cmd prompt, i.e., crashes in MS-world, but not in MinGW/MSYS
The crash error message is the MS dialog that simply states it has
crashed and would I like to inform MS (no).
If I take this to debug, I get a traceback as:
But since the debugger is VisualStudio, and it knows nothing about my
source code, I get only the disassembly and hex offsets for the crash
location (not my idea of a fun day to reverse assembler and hex back to
source...) (It's a shame, too, that I can't specify MSYS:gdb as my debugger
when MS asks what debugger I'd like to use. or can I?)
I'll try to add some helpful printf() statements to try to isolate the
offending line (it's very near startup as no GTK window ever gets produced),
but any other ideas would be appreciated.
And thanks, I now understand that deploying my app really should be as
simple as providing my executable and the necessary libraries in a single
directory. That's good to know. Now if I can just track down why it
crashes dependent on how it's executed, I'm there.
On Tue, Aug 19, 2008 at 12:29 PM, Greg Chicares <gchicares@...:
> On 2008-08-19 09:55Z, richard boaz wrote:
> > I recently ported an app originally written on LINUX using GTK+ to
> > Using MinGw, MSYS, and the GTK+ port, it went off without a hitch;
> > to all those who have made such ports so straightforward and easy.
> > My question relates to deployment of this app. I have determined which
> > libraries are necessary for packaging and release, but I haven't yet
> > out how the application should be best deployed on a target machine.
> Perhaps the simplest and most robust way is to put the app, along
> with all the dlls it requires, in its own directory on the target
> > The target machine will not have MinGW pre-installed, so the MinGW
> > libraries are included in my release. What I am trying to achieve is for
> > the user to be able to double-click the app icon and have it launch from
> > there.
> Generally users won't need the compiler anyway, and you needn't
> distribute many (if any) of the libraries provided by MinGW. You
> may need to distribute 'mingwm10.dll' if your app is threaded,
> and perhaps a libstdc++ dll if you're using C++ with gcc-4.
> > What I am experiencing is that my app only works if I start it from
> > an MSYS window. If I double-click the app in Explorer, it crashes at
> > startup (somehwere in msvcrt.dll).
> I would suspect an anomaly in the app.
> > Is this normal? Is it possible that
> > when launching from an MSYS window my app is picking up a different
> > of msvcrt.dll than when double-clicking in Explorer? How can I know
> > version of msvcrt.dll is being picked up under which execution scenario?
> It should always pick up the right version of the system runtime
> library, which by default is one that's included in every version
> of msw (so you shouldn't need to redistribute it).
> Probably the reported location of the crash is a red herring. A
> library function can fail if it's passed invalid parameters. I'd
> examine the crash in greater detail; gdb might help.
> > More generally, what are the guidelines to observe when deploying an
> > application built in MinGW/MSYS on a target machine that does not have
> > or MSYS installed?
> As mentioned above, there's little or nothing in MinGW that you
> need to redistribute. And probably nothing in MSYS, either,
> unless you've written an MSYS-dependent app: but that's quite
> difficult to do, and you'd know if you'd done it.
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> Build the coolest Linux based applications with Moblin SDK & win great
> Grand prize is a trip for two to an Open Source event anywhere in the world
> MinGW-users mailing list
> You may change your MinGW Account Options or unsubscribe at: