Linker want debug libs instead of release libs (wx2.9)

44 views
Skip to first unread message

Dave Tapley

unread,
Dec 30, 2011, 5:22:07 PM12/30/11
to wx-...@googlegroups.com
Hi all,

I just happened upon this forum post:
http://forums.wxwidgets.org/viewtopic.php?f=19&t=31435

Which appears to be related to this post regarding the Windows port of wx-config:
http://code.google.com/p/wx-config-win/issues/detail?id=21

Did this first issue ever make it to this list?

Vadim Zeitlin

unread,
Dec 30, 2011, 5:39:49 PM12/30/11
to wx-...@googlegroups.com
On Fri, 30 Dec 2011 14:22:07 -0800 (PST) Dave Tapley <duke...@gmail.com> wrote:

DT> Which appears to be related to this post regarding the Windows port of
DT> wx-config:
DT> http://code.google.com/p/wx-config-win/issues/detail?id=21
DT>
DT> Did this first issue ever make it to this list?

No, I've never heard about it. But now that I did, I think it's a problem
in wx-config-win and not wx itself anyhow because:

1. DEBUG_FLAG is correctly set to 1 indicating that debug code is not
disabled (which is the default).
2. To determine "d" suffix presence for MSVC DEBUG_RUNTIME_LIBS should be
used and not DEBUG_FLAG (see WXDEBUGFLAG definition in common.bkl).
3. But for gcc "d" suffix should never be used at all as it indicates
debug run-time which simply doesn't exist for gcc.

HTH,
VZ

Dave Tapley

unread,
Jan 4, 2012, 11:20:52 AM1/4/12
to wx-...@googlegroups.com
Thanks for the fast reply Vadim.
I wasn't aware of the changes to debugging in wx>2.9.0, is it safe to assume the three points made above are a result of these changes?
http://wxwidgets.blogspot.com/2009/09/debug-build-changes-in-wx3.html

Dave,
 

 HTH,
VZ

Vadim Zeitlin

unread,
Jan 4, 2012, 11:50:43 AM1/4/12
to wx-...@googlegroups.com
On Wed, 4 Jan 2012 08:20:52 -0800 (PST) Dave Tapley <duke...@gmail.com> wrote:

DT> On Friday, 30 December 2011 22:39:49 UTC, VZ wrote:
DT> > 1. DEBUG_FLAG is correctly set to 1 indicating that debug code is not
DT> > disabled (which is the default).
DT> > 2. To determine "d" suffix presence for MSVC DEBUG_RUNTIME_LIBS should be
DT> > used and not DEBUG_FLAG (see WXDEBUGFLAG definition in common.bkl).
DT> > 3. But for gcc "d" suffix should never be used at all as it indicates
DT> > debug run-time which simply doesn't exist for gcc.
DT> >
DT> Thanks for the fast reply Vadim.
DT> I wasn't aware of the changes to debugging in wx>2.9.0, is it safe to
DT> assume the three points made above are a result of these changes?
DT> http://wxwidgets.blogspot.com/2009/09/debug-build-changes-in-wx3.html

Yes, exactly.

Regards,
VZ

Dave Tapley

unread,
Jan 10, 2012, 11:30:01 AM1/10/12
to wx-...@googlegroups.com
On Wednesday, 4 January 2012 16:50:43 UTC, VZ wrote:

DT> I wasn't aware of the changes to debugging in wx>2.9.0, is it safe to
DT> assume the three points made above are a result of these changes?
DT> http://wxwidgets.blogspot.com/2009/09/debug-build-changes-in-wx3.html

I have a another question regarding the above post, if I may (before I start misguidedly hacking on wx-config-win):

It states that: "We still have two different builds under Windows because of the point (2) above: debug builds of the applications use debug CRT and so they must use a special build of the library which was also compiled with the debug CRT".

Does "under Windows" here, imply "under Windows using MSVC", or "under Windows using any compiler"?

I ask because the "point (2) above" states that: "at least with the MSVC compiler, debug builds use the special debug version of C run-time library which not only has the asserts enabled in it but also has additional checks".


Vadim Zeitlin

unread,
Jan 10, 2012, 12:05:41 PM1/10/12
to wx-...@googlegroups.com
On Tue, 10 Jan 2012 08:30:01 -0800 (PST) Dave Tapley <duke...@gmail.com> wrote:

DT> On Wednesday, 4 January 2012 16:50:43 UTC, VZ wrote:
DT> >

DT> > DT> I wasn't aware of the changes to debugging in wx>2.9.0, is it safe to
DT> > DT> assume the three points made above are a result of these changes?
DT> > DT> http://wxwidgets.blogspot.com/2009/09/debug-build-changes-in-wx3.html
DT> >
DT> I have a another question regarding the above post, if I may (before I
DT> start misguidedly hacking on wx-config-win):
DT>
DT> It states that: "We still have two different builds under Windows because
DT> of the point (2) above: debug builds of the applications use debug CRT and
DT> so they must use a special build of the library which was also compiled
DT> with the debug CRT".
DT>
DT> Does "under Windows" here, imply "under Windows using MSVC", or "under
DT> Windows using any compiler"?

Currently "d" suffix is used for the libraries compiled with BUILD=debug
for any compiler AFAICS but I think this is actually wrong and we should
only use "d" suffix for ABI-incompatible debug libraries, i.e. for the
compilers that have different debug and release versions of CRT. AFAIK
Borland does it too but I haven't used it for ages. Microsoft definitely
does do it, of course, while g++ does not.

So we should probably never use "d" suffix for the libraries with g++.
Or does somebody see some reason to use it that I'm missing?

Regards,
VZ

Reply all
Reply to author
Forward
0 new messages