|
From: Greg C. <chi...@co...> - 2007-08-11 13:59:47
|
On 2007-08-11 04:49Z, Chander M Ahuja wrote: > > After compilation & linking in IDE --> in a DOS window, i can use gdb > to load and run (or step thru) the program as expected (Program exits > normally). > > However if i directly start the program at the prompt it immediately > quits with a windows Application error popup and the message "the > instruction at 0x7c911404 referenced memory at 0xfffffff8. the memory > cannot be "read". Program seems to run fine under gdb, but crashes when run outside the debugger--see: http://lists-archives.org/mingw-users/06091-baadf00d.html for ways to track down the problem. > Environment: I installed the MinGWStudio full IDE package and am > building using that. The various versions of mingw included by this > package install were: > gcc 3.3.1 > binutils 2.14.90 That would seem to be several years old. I believe there's a problem either in your program or in one of the third- party libraries you're using, and updating the toolchain isn't the answer to that problem, but it is a good idea for other reasons. > The linked application (0 errors) runs from within the IDE or within gdb > from the command line, but fails when executed directly. I was expecting > mingw to produce "native" Win32 apps that could execute off cmd line ? If you built it with MinGW tools, then it's a native msw app. It does run from the command line; it just doesn't run as expected, presumably because of some defect that's masked by running it under gdb. [snip "MinGWStudio" issues] > PS>> Is anyone using / supporting MinGWStudio (no mailing list) ? Anyone Searching my local archives (which I think are complete) for "MinGWStudio", I find: 1 message in 2007 (yours) 0 messages in 2006 2 messages in 2005 > recommend another IDE thats easy to setup and provide a better fit to > mingw and is actively used by community... My impression is that most people here aren't using any IDE. > and most importantly produce > an executable that will execute natively with no dll's etc to accompany > the exe. There are two different concepts here. If you were using Cygwin gcc, you'd produce programs that require the Cygwin dll, which includes a C runtime different from the one provided "natively" by msw. Using MinGW gcc, you produce programs that use the C runtime provided as part of msw, and we might say that a MinGW app runs "natively" in that sense. That's what this page http://mingw.org/ means when it says MinGW produces "native Windows programs that do not rely on any 3rd-party C runtime DLLs." But a "native" program can require other dlls, some of which may not be part of the OS. You say you're using 'bgd.dll', so that has to accompany your program. "Native" doesn't mean that no dlls are required. |