=====
My system:
[David@Ocean ~]$ uname -a
Linux Ocean 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
=====
wxWidgets:
[David@Ocean ~]$ rpm -qa | grep wx
wxGTK-gl-2.8.11-3.fc14.x86_64
wxGTK-2.8.11-3.fc14.x86_64
wxGTK-media-2.8.11-3.fc14.x86_64
wxBase-2.8.11-3.fc14.x86_64
wxGTK-devel-2.8.11-3.fc14.x86_64
Build CodeBlocks svn7071 encounter errors
=====
....
....
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o codesnippetstreectrl.o `test -f './../codesnippetstreectrl.cpp' || echo './'`./../codesnippetstreectrl.cpp
g++ -DHAVE_CONFIG_H -I. -I../../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../../../src/include -I../../../../../src/sdk/wxscintilla/include -I../../../../../src/plugins/contrib/codesnippets -I../../../../../src/plugins/contrib/codesnippets/Search -I../../../../../src/plugins/contrib/codesnippets/editor -I../../../../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o codesnippetswindow.o `test -f './../codesnippetswindow.cpp' || echo './'`./../codesnippetswindow.cpp
./../codesnippetstreectrl.cpp: In constructor 'CodeSnippetsTreeCtrl::CodeSnippetsTreeCtrl(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int)':
./../codesnippetstreectrl.cpp:97:39: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::EndInternalTreeItemDrag()':
./../codesnippetstreectrl.cpp:1073:23: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp:1074:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::FinishExternalDrag()':
./../codesnippetstreectrl.cpp:1294:23: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp:1295:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
./../codesnippetstreectrl.cpp: In member function 'void CodeSnippetsTreeCtrl::OnEndTreeItemDrag(wxTreeEvent&)':
./../codesnippetstreectrl.cpp:1406:21: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
make[5]: *** [codesnippetstreectrl.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets/resources'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.b5yWq5 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.b5yWq5 (%build)
[David@Ocean SPECS]$
Please Re-Read my last message on your wxWidgets build problem!!!!
Note: I am now considering you to be a spam bot!!!
I've seen this problem on Centos 5.5, so wangdong1226 is not a spambot :)
I've a patch for it but, I've no time to discuss it with the others or to test it on anything else than CentOS.
A workaround is to use --with-contrib-plugins=all,-CodeSnipets (see ./configure --help for details)
p.s. Don't attach images on the forum, use a picpaste service like imageshank, photobucket, etc. The attachment space is limited and the admins wipe at random, when there is no space left on the device.
Please Re-Read my last message on your wxWidgets build problem!!!!
Note: I am now considering you to be a spam bot!!!
No, I'm not a spam bot!
when I use CB on wxGTK-2.8.12, problem happens, not on wx2.9!!!
I do know on wx2.9 some strange problems may happen, you've told me. I know this. But it is still wx2.8, just wx2.8.12!!!
I don't understand, why codeblocks developers do not want to hear or listening something even it is a little bit new ?!
In China, there's a word "If you stop going ahead, you will regress."
I do not want to give you a lesson, for I'm only a very very junior code lover. But I or someone like me (very very junior code lover or coder) want to know some new things and try to understand and using them, why you skilled advanced professional developers don't ??!!
You don't like new and fresh things? even they can give you new idea and eyesight ?
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (revision 7071)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.cpp (working copy)
@@ -94,8 +94,6 @@
m_mimeDatabase = 0;
m_bBeginInternalDrag = false;
m_LastXmlModifiedTime = time_t(0); //2009/03/15
- m_itemAtKeyUp = m_itemAtKeyDown = 0;
-
m_pSnippetsTreeCtrl = this;
GetConfig()->SetSnippetsTreeCtrl(this);
@@ -1070,11 +1068,7 @@
}
delete pDoc; pDoc = 0;
- m_itemAtKeyDown = 0;
- m_itemAtKeyUp = 0;
-
- return;
-
+ m_itemAtKeyDown = m_itemAtKeyUp = wxTreeItemId();
}//OnEndTreeItemDrag
// ----------------------------------------------------------------------------
void CodeSnippetsTreeCtrl::OnEnterWindow(wxMouseEvent& event)
@@ -1291,9 +1285,7 @@
delete textData; //wxTextDataObject
delete fileData; //wxFileDataObject
m_TreeText = wxEmptyString;
- m_itemAtKeyDown = 0;
- m_itemAtKeyUp = 0;
-
+ m_itemAtKeyDown = m_itemAtKeyUp = wxTreeItemId();
}
//// ----------------------------------------------------------------------------
//void CodeSnippetsTreeCtrl::OnMouseMotionEvent(wxMouseEvent& event)
@@ -1403,7 +1395,7 @@
m_MouseUpX = event.GetPoint().x;
m_MouseUpY = event.GetPoint().y;
- m_itemAtKeyUp = 0;
+ m_itemAtKeyUp = wxTreeItemId();
int hitFlags = 0;
wxTreeItemId id = HitTest(wxPoint(m_MouseUpX, m_MouseUpY), hitFlags);
if (id.IsOk() and (hitFlags & (wxTREE_HITTEST_ONITEMICON | wxTREE_HITTEST_ONITEMLABEL )))
I disagree
http://forums.codeblocks.org/index.php/topic,14289.msg96177.html#msg96177
Bye
Tim S.
This is not a code profiler patch!
It should fix the compilation of the code snippets plugin, when wxGTK is installed from the official package in Fedora/CentoOS.
Is this the case?
Anyone against this patch? Pecan?
This is not a code profiler patch!
It should fix the compilation of the code snippets plugin, when wxGTK is installed from the official package in Fedora/CentoOS.
Is this the case?
Anyone against this patch? Pecan?
#if WXWIN_COMPATIBILITY_2_4
74 // deprecated: only for compatibility, don't work on 64 bit archs
75 wxTreeItemId(long item) { m_pItem = wxUIntToPtr(item); }
76 operator long() const { return (long)wxPtrToUInt(m_pItem); }
77 #else // !WXWIN_COMPATIBILITY_2_4
OK, And have you seen some lines above it that the only methods allowed are the default constructorI don't use it also.
(it is not written as allowed, but I guess it is, I will write a bug report for it thought:) ) and the IsOk?
And wxTreeItemId(void *) is not one of them, so the C::B's usage is wrong (I'll contact wx guys to
hear what they think about it).
Can someone test my patch and verify that CodeSnippets is working with it. I don't use it and can't do so, unfortunately.
wxTreeItemId::wxTreeItemId
wxTreeItemId()
Default constructor. wxTreemItemIds are not meant to be constructed explicitly by the user; they are returned by the wxTreeCtrl functions instead.
(2011-03-30 22:25:13) obfuscated: hi, can I do something like "class Something { wxTreeItemId storeForLater; }; " or this is not allowed?
(2011-03-30 22:26:46) DavidGH: obfuscated: You can't reliably do that, as a wxTreeItemId isn't guaranteed to live for long
(2011-03-30 22:27:13) DavidGH: As soon as a tree is recreated, or (I think) an item inserted, the old ids become invalid
(2011-03-30 22:27:36) obfuscated: so, how do you store something like a pointer to an item?
(2011-03-30 22:28:05) DavidGH: You don't. You search the tree each time you want it
(2011-03-30 22:28:52) DavidGH: Of course it depends on your situation: if you are certain that the tree won't be altered in the course of your function...
---------------
......
......
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I../../../../src/plugins/contrib/codesnippets -I../../../../src/plugins/contrib/codesnippets/Search -I../../../../src/plugins/contrib/codesnippets/editor -I../../../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c Search/DirectoryParamsPanel.cpp -fPIC -DPIC -o .libs/DirectoryParamsPanel.o
/bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I../../../../src/plugins/contrib/codesnippets -I../../../../src/plugins/contrib/codesnippets/Search -I../../../../src/plugins/contrib/codesnippets/editor -I../../../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c -o InsertIndexManager.lo `test -f 'Search/InsertIndexManager.cpp' || echo './'`Search/InsertIndexManager.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../../../src/include -I/usr/lib64/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I../../../../src/include -I../../../../src/sdk/wxscintilla/include -I../../../../src/plugins/contrib/codesnippets -I../../../../src/plugins/contrib/codesnippets/Search -I../../../../src/plugins/contrib/codesnippets/editor -I../../../../src/include/mozilla_chardet -Ulinux -Uunix -O2 -ffast-math -DCB_AUTOCONF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DCB_PRECOMP -Winvalid-pch -fPIC -DPIC -fexceptions -c Search/InsertIndexManager.cpp -fPIC -DPIC -o .libs/InsertIndexManager.o
codesnippets.cpp: In constructor 'CodeSnippets::CodeSnippets()':
codesnippets.cpp:109:52: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
codesnippets.cpp: In member function 'void CodeSnippets::OnPrjTreeMouseLeftDownEvent(wxMouseEvent&)':
codesnippets.cpp:1243:30: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
codesnippets.cpp:1244:28: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
codesnippets.cpp: In member function 'void CodeSnippets::OnPrjTreeMouseLeftUpEvent(wxMouseEvent&)':
codesnippets.cpp:1273:28: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
codesnippets.cpp: In member function 'void CodeSnippets::DoPrjTreeExternalDrag(wxTreeCtrl*)':
codesnippets.cpp:1449:30: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
codesnippets.cpp:1450:28: error: conversion from 'int' to 'const wxTreeItemId' is ambiguous
/usr/include/wx-2.8/wx/treebase.h:75:5: note: candidates are: wxTreeItemId::wxTreeItemId(long int)
/usr/include/wx-2.8/wx/treebase.h:59:5: note: wxTreeItemId::wxTreeItemId(void*)
make[5]: *** [codesnippets.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
Search/InsertIndexManager.cpp: In member function 'long int InsertIndexManager::GetInsertionIndex(const wxString&, long int)':
Search/InsertIndexManager.cpp:24:7: warning: 'index' may be used uninitialized in this function
make[5]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib/codesnippets'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/David/rpmbuild/BUILD/codeblocks/src'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.lzgOx1 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.lzgOx1 (%build)
[David@Ocean SPECS]$
[David@Ocean SPECS]$ rpm -qa | grep wx
wxGTK-gl-2.8.11-3.fc14.x86_64
wxBase-2.8.11-3.fc14.x86_64
wxGTK-2.8.11-3.fc14.x86_64
wxGTK-devel-2.8.11-3.fc14.x86_64
wxGTK-media-2.8.11-3.fc14.x86_64
[David@Ocean SPECS]$ uname -a
Linux Ocean 2.6.35.11-83.fc14.x86_64 #1 SMP Mon Feb 7 07:06:44 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[David@Ocean SPECS]$
--------------
Try building wxWidgets without using "--enable-compat24".