From: Les Newell on
Hi,

I am using 2.7.0, MSW, dynamic, multilib, compiled with Visual Studio
2005. I have built both debug and release dlls.

If I link to the debug libs my app links fine. If I link to the release
libs I get the following unresolved externals:
Page.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char
const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPBDH000@Z)

keysetup.obj : error LNK2001: unresolved external symbol "public:
virtual bool __thiscall wxSizer::Remove(class wxWindow *)"
(?Remove(a)wxSizer@@UAE_NPAVwxWindow@@@Z)

GInterpApp.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxAppConsole::OnAssertFailure(char const
*,int,char const *,char const *,char const *)"
(?OnAssertFailure(a)wxAppConsole@@UAEXPBDH000@Z)

GInterpApp.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall wxAppConsole::OnAssert(char const *,int,char
const *,char const *)" (?OnAssert(a)wxAppConsole@@UAEXPBDH00@Z)


Does anyone have any idea why this only happens for the release libs?

Les

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Vadim Zeitlin on
On Tue, 15 Aug 2006 17:20:27 +0100 Les Newell <lesnewell(a)fmail.co.uk> wrote:

LN> If I link to the debug libs my app links fine. If I link to the release
LN> libs I get the following unresolved externals:
LN> Page.obj : error LNK2001: unresolved external symbol
LN> "__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char
LN> const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPBDH000@Z)

If you link to the release libs you must not define __WXDEBUG__ during
compilation -- but you do.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Les Newell on
I haven't got __WXDEBUG__ defined. I only have: __WXMSW__ WXUSINGDLL=1
_CRT_SECURE_NO_DEPRECATE


Thanks,
Les

Vadim Zeitlin wrote:
> On Tue, 15 Aug 2006 17:20:27 +0100 Les Newell <lesnewell(a)fmail.co.uk> wrote:
>
> LN> If I link to the debug libs my app links fine. If I link to the release
> LN> libs I get the following unresolved externals:
> LN> Page.obj : error LNK2001: unresolved external symbol
> LN> "__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char
> LN> const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPBDH000@Z)
>
> If you link to the release libs you must not define __WXDEBUG__ during
> compilation -- but you do.
>
> Regards,
> VZ
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Les Newell on
OK, thanks. I'll have a hunt and see if I can find where it is defined.

Les

Vadim Zeitlin wrote:
> On Tue, 15 Aug 2006 17:40:04 +0100 Les Newell <lesnewell(a)fmail.co.uk> wrote:
>
> LN> I haven't got __WXDEBUG__ defined. I only have: __WXMSW__ WXUSINGDLL=1
> LN> _CRT_SECURE_NO_DEPRECATE
> ...
> LN> > LN> If I link to the debug libs my app links fine. If I link to the release
> LN> > LN> libs I get the following unresolved externals:
> LN> > LN> Page.obj : error LNK2001: unresolved external symbol
> LN> > LN> "__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char
> LN> > LN> const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPBDH000@Z)
> LN> >
> LN> > If you link to the release libs you must not define __WXDEBUG__ during
> LN> > compilation -- but you do.
>
> If your program references wxOnAssert then __WXDEBUG__ is defined,
> somehow, because wxOnAssert is only used when this is the case, see
> wx/debug.h.
>
> Regards,
> VZ
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: Les Newell on
I finally found the problem. MSVC++ was defining _DEBUG. In wx/debug.h,
if _DEBUG is defined it automatically defines __WXDEBUG__

Les

Vadim Zeitlin wrote:
> On Tue, 15 Aug 2006 17:40:04 +0100 Les Newell <lesnewell(a)fmail.co.uk> wrote:
>
> LN> I haven't got __WXDEBUG__ defined. I only have: __WXMSW__ WXUSINGDLL=1
> LN> _CRT_SECURE_NO_DEPRECATE
> ...
> LN> > LN> If I link to the debug libs my app links fine. If I link to the release
> LN> > LN> libs I get the following unresolved externals:
> LN> > LN> Page.obj : error LNK2001: unresolved external symbol
> LN> > LN> "__declspec(dllimport) void __cdecl wxOnAssert(char const *,int,char
> LN> > LN> const *,char const *,char const *)" (__imp_?wxOnAssert@@YAXPBDH000@Z)
> LN> >
> LN> > If you link to the release libs you must not define __WXDEBUG__ during
> LN> > compilation -- but you do.
>
> If your program references wxOnAssert then __WXDEBUG__ is defined,
> somehow, because wxOnAssert is only used when this is the case, see
> wx/debug.h.
>
> Regards,
> VZ
>

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org