Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: MinGW Developer Studio problem (I think)

3 views
Skip to first unread message

Troels

unread,
Jan 29, 2006, 12:13:38 PM1/29/06
to
Hi,

I'm experiencing the same exact problem build as Brian (old post below),
only difference is that I'm using CodeBlocks (also MinGW).
I wonder if you found the cure Brian, or if anybody else here knows the
solution! The problem:

My wxWidgets GUI app compiles, links, but fails to execute.
- It runs and stops immediately, silently.
- Never gets to wxApp::OnInit.
- gdb cannot step into it

I've tried
- all combinations of -frtti,-fno-rtti,-fexceptions,-fno-exceptions
- linking with debug and non-debug wx builds, static and dll builds
- with and without WINVER (WINVER=0x0400)

The exe looks good, it's a valid GUI exe alright, Windows can display
it's version (from the .res), MSVC Depends displays the expected dll
dependencies.

Strangest thing is that I have another - only smaller - wxWidgets GUI
project that builds and runs perfectly (regardsless of linking with
debug or non-debug wx builds, static and dll builds).

BR>I've used the last two days on this, and I'm STUCK!!

Me too :(

Thanks
Troels

Using
- wxWidgets 2.6.2
- Windows 2000
- MinGW gcc 3.4.4
- unmodified/default setup.h

From: Brian Riis <ravnsgaard <at> lycos.co.uk>
Subject: MinGW Developer Studio problem (I think)
Newsgroups: gmane.comp.lib.wxwindows.general
Date: 2003-11-05 16:56:09 GMT

Ok, this is a cry for help!

I've been working on a project for some time, and after a late night
coding session recently, a rebuild suddenly failed fabulously. I got a
host of link errors, mostly consisting of "duplicate reference has
different size" errors. It started with my wxTextCtrl objects and spread
to some of my wxSpinCtrl objects.

I immediately panicked (that's just me, I suppose) and started updating
variuos software in the toolchain when my first attempts for a solution
failed. This resulted in an update from GCC 3.2.3 to 3.3.1, the latest
release from MinGW's homepage. After a complete rebuild of wxWindows I
gave it another shot, and the linker errors disappeared.

HOWEVER, now the program insists on failing _before_ ever getting to
wxApp::OnInit(), which obviously makes debugging a little difficult. In
a desperate attempt to achieve something, I created a new project in
MinGW Dev. Studio, and copied the necessary files from the
samples/minimal directory, just to try to recreate that sample, as the
sample, if compiled from MSYS, works flawlessly.

To my great surprise, even THAT would not run. It compiles, links, and
then fails silently. I tried adding a breakpoint at the IMPLEMENT_APP()
macro, which works, but when I try to "step into" it, I immediately get
a Seg Fault. I never get near OnInit(). Closer examination of the two
directories show that MinGW Studio's minimal.o is only 232Kb even with
-ggdb3, -frtti and -fexceptions. minimal.o in the samples directory is
345Kb. Obviously something is amiss here. I think I've tried just about
every setting MinGW Dev. Studio has to offer, but I cannot seem to make
any changes to the object file size. I suspect that the IDE adds some
hidden options, but I really don't know for sure. There are no obvious
hints in the generated makefile. However, as the original sample
compiled and ran first time, I still think it is a MinGW Studio problem.

I am running MinGW-3.1.0-1 with an update to GCC 3.3.1, and MSYS-1.0.9.
MinGW Developer Studio is version 2.02. I am using wxMSW-2.4.2 off the
shelf (the installer executable).

Any help, hints or just comfort is highly appreciated. I've used the
last two days on this, and I'm STUCK!!

/Brian Riis

wolfendu...@yahoo.com

unread,
Jan 29, 2006, 12:45:01 PM1/29/06
to
You might way to just start up msys, go to the directory of your application and using g++ by hand and see if it will compile. I have no problem with a set up very much like yours, except I use dialogblocks instead and do most of my compiling from the command line with a makefile.

basically manually just do the following to give it a shot (no makefile or anything else) you might get some helpful warnings or errors.

g++ -c my_file_to_compile.cpp `wx-config --cppflags`

on all of your files then link the .o files with

g++ file1.o file2.o `wx-config --libs` -o my_exe.exe

If you are able to this you will be seperating problems with your IDE from command line (g++) problems. I am using the same mingw and msys as you as well on windows XP. No problems so far.

--wolf


Hi,

Me too :(

Thanks
Troels

/Brian Riis

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
For additional commands, e-mail: wx-use...@lists.wxwidgets.org

Troels

unread,
Jan 29, 2006, 2:03:30 PM1/29/06
to
Thanks for the idea. I don't know, I've examined setup.h and
wx/build/msw/config.gcc and running mingw32-make on
samples/minimal/makefile.gcc to check the command line. No mysteries in
there I think, -mthreads is the only interesting option I see there and
I'm using that too. I must have overlooked something else.

> basically manually just do the following to give it a shot
>(no makefile or anything else) you might get some helpful warnings or
>errors.

My project has too many files, links to several lib targets. Except, I'm
almost down to no libs now, cut out most code with #ifdef. Still no luck.

/Troels

0 new messages