|
From: Chander M A. <cha...@sa...> - 2007-08-11 04:49:25
|
Hi, Help! I am seeing a strange problem using MinGW (first project with mingw) and maybe someone can easily recognize what i have / haven't done right. I am moving an app from MSVC to MinGW... Problem: 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". 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 mingw-runtime 3.2 w32api 2.4 gdb 6.0 gnu make 3.80.0 The link line is: gcc -o <list of object.o files> -L. -lbgd -lxml2 bgd.dll is in the same directory as executable when running app and i created the libbgd.a import lib and def file etc. using info on the web xml i got came as libxml2.a already and seems to satisfy the linker 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 ? true ?? Is this possibly something due to the MinGWStudio IDE ?? My application doesn't use any Windows API (slated as a web CGI eventually). [ As a side-note: - I also had problems putting all the object code into a "Static library" (project type per MingGWStudio) as there were interlibrary "undefined references" generated altho the libs were in correct order on the command line (caller first). - anyhow, currently all the objects are listed on the link command line itself s given above. I want to compile & link it statically (as far as possible), but right now i cannot even get it working standalone. - the IDE's exported Makefile does not run as-is but i think thats probably because i do not have MSYS installed on my system (the / and \ in filenames is the first issue...) - and i haven't got to change it and use it for compiling without IDE yet (linking works). end-sidenote] Any ideas, suggestions and "u newbie - you forgot to ....." comments are all welcome (...i am a newbie with mingw, but been using gcc on *nix for years) Thanks in advance for responding. -chander PS>> Is anyone using / supporting MinGWStudio (no mailing list) ? Anyone recommend another IDE thats easy to setup and provide a better fit to mingw and is actively used by community...and most importantly produce an executable that will execute natively with no dll's etc to accompany the exe. |