Hi All,
I need to build a debug build of wxPython and wxWidgets.
I've added a new method to TaskBarIcon to support showing a balloon tip
in Windows XP.
The additions /seem/ fine and my code is run when I call the python.
However the balloon tip doesn't show. Worse I can't debug it as it's
optimised.
So I tried building a pure debug build instead of a hybrid.
I do:
nmake -f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=0 USE_OPENGL=1
USE_GDIPLUS=0 BUILD=debug CXXFLAGS=/D__NO_VC_CRTDBG__ UNICODE=1
MSLU=0 DEBUG_INFO=1 DEBUG_RUNTIME_LIBS=0 DEBUG_FLAG=1 WXDEBUGFLAG=d
and apart from jpeg etc all my code compiles with something like:
cl /c /nologo /TP /Fovc_mswuddll\stcdll_XPM.obj /MD /DWIN32 /Zi
/Fd..\..\src\stc\..\..\..\lib\vc_dll\wxmsw28ud_stc_vc.pdb /Od
/D__NO_VC_CRTDBG__ /D__WXMSW__ /D__WXDEBUG__ /D_UNICODE /I..
\..\src\stc\..\..\..\lib\vc_dll\mswud /I..\..\src\stc\..\..\..\include
/W4 /I..\..\src\stc\..\..\include /I..\..\src\stc\scintilla\include
/I..\..\src\stc\scintilla\src /D__WX__ /DSCI_LEXER /DLINK_
LEXERS /DWXUSINGDLL /DWXMAKINGDLL_STC /GR /EHsc /D__NO_VC_CRTDBG__
../../src/stc\scintilla\src\XPM.cxx
XPM.cxx
But then I get:
cd wxPython-src-2.8.7.1\wxPython && "c:\Python23\python.exe" setup.py
build_ext --inplace MONOLITHIC=0 UNICODE=1 FINAL=0
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing ACTIVEX...
Preparing GIZMOS...
running build_ext
building '_core_' extension
creating build.unicode
creating build.unicode\temp.win32-2.3
creating build.unicode\temp.win32-2.3\Release
creating build.unicode\temp.win32-2.3\Release\src
creating build.unicode\temp.win32-2.3\Release\src\msw
C:\Program Files\Microsoft Visual Studio\COMMON\MSDev98\Bin\rc.exe
-DWIN32 -D_WINDOWS -D__WXMSW__ -DWXUSINGDLL=1
-DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE
-DWXP_USE_THREAD=1 -UNDEBU
G -D__WXDEBUG__ -DwxUSE_UNICODE=1 -Iinclude -Isrc
-Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\lib\vc_dll\mswud
-Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\include
-Ic:\sb\tb\2.8.7.1\wxPython
\wxPython-src-2.8.7.1\contrib\include -Ic:\Python23\include
-Ic:\Python23\PC /fobuild.unicode\temp.win32-2.3\Release\src/wxc.res
src/wxc.rc
C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GX /DNDEBUG -DWIN32 -D_WINDOWS -D__WXMSW__ -DWXUSINGDLL=1
-DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE
-DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -DwxUSE_UNICODE=1 -Iinclude
-Isrc -Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\lib\vc_dll\mswud
-Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\include -
Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\contrib\include
-Ic:\Python23\include -Ic:\Python23\PC /Tpsrc\msw\_core_wrap.cpp
/Fobuild.unicode\temp.win32-2.3\Release\src\msw\_core_wrap.obj /Gy
_core_wrap.cpp
C:\Program Files\Microsoft Visual Studio\VC98\BIN\cl.exe /c /nologo /Ox
/MD /W3 /GX /DNDEBUG -DWIN32 -D_WINDOWS -D__WXMSW__ -DWXUSINGDLL=1
-DSWIG_TYPE_TABLE=_wxPython_table -DSWIG_PYTHON_OUTPUT_TUPLE
-DWXP_USE_THREAD=1 -UNDEBUG -D__WXDEBUG__ -DwxUSE_UNICODE=1 -Iinclude
-Isrc -Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\lib\vc_dll\mswud
-Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\include -
Ic:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\contrib\include
-Ic:\Python23\include -Ic:\Python23\PC /Tpsrc/helpers.cpp
/Fobuild.unicode\temp.win32-2.3\Release\src/helpers.obj /Gy
helpers.cpp
C:\Program Files\Microsoft Visual Studio\VC98\BIN\link.exe /DLL /nologo
/INCREMENTAL:NO
/LIBPATH:c:\sb\tb\2.8.7.1\wxPython\wxPython-src-2.8.7.1\lib\vc_dll
/LIBPATH:c:\Python23\libs /LIBPATH:c:\Python2
3\PCBuild wxbase28ud.lib wxbase28ud_net.lib wxbase28ud_xml.lib
wxmsw28ud_core.lib wxmsw28ud_adv.lib wxmsw28ud_html.lib kernel32.lib
user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib
oldnames.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib
rpcrt4.lib advapi32.lib wsock32.lib /EXPORT:init_core_
build.unicode\temp.win32-2.3\Release\src/helpers.obj build.unicode\temp.win
32-2.3\Release\src/wxc.res
build.unicode\temp.win32-2.3\Release\src\msw\_core_wrap.obj
/OUT:wx\_core_.pyd
/IMPLIB:build.unicode\temp.win32-2.3\Release\src\_core_.lib
Creating library build.unicode\temp.win32-2.3\Release\src\_core_.lib
and object build.unicode\temp.win32-2.3\Release\src\_core_.exp
helpers.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) void * __cdecl operator new(unsigned int,int,char
const *,int)" (__imp_??2@YAPAXIHPBDH@Z)
wx\_core_.pyd : fatal error LNK1120: 1 unresolved externals
error: command '"C:\Program Files\Microsoft Visual
Studio\VC98\BIN\link.exe"' failed with exit status 1120
Any thoughts?
Also my extra code looks like this:
bool wxTaskBarIcon::ShowBalloonTip(const wxString& title, const
wxString& message, int kind)
{
// NB: we have to create the window lazily because of backward
compatibility,
// old applications may create a wxTaskBarIcon instance before wxApp
// is initialized (as samples/taskbar used to do)
if (!m_win)
{
m_win = new wxTaskBarIconWindow(this);
}
NotifyIconData notifyData(GetHwndOf(m_win), NIF_INFO);
if ( !title.empty() )
{
wxStrncpy(notifyData.szInfoTitle, title.c_str(),
WXSIZEOF(notifyData.szInfoTitle));
}
if ( !message.empty() )
{
wxStrncpy(notifyData.szInfo, message.c_str(),
WXSIZEOF(notifyData.szInfo));
}
DWORD infoFlags = (kind == 2 ? NIIF_ERROR : (kind == 1 ?
NIIF_WARNING : NIIF_INFO));
notifyData.dwInfoFlags = infoFlags;
int ret = Shell_NotifyIcon(NIM_MODIFY, ¬ifyData);
bool ok = (ret != 0);
return ok;
}
Any thoughts on why the balloon tip never appears?
The code /claims/ that int ret != 0, and so returns True.
Ranec