Author Topic: Problem compiling C::B w/ wxGTK 2.8.0  (Read 6218 times)

diilbert

  • Guest
Problem compiling C::B w/ wxGTK 2.8.0
« on: April 22, 2007, 03:19:17 am »
I am trying to build Code:Blocks SVN (today) with wxGTK 2.8.0 and am getting errors with make when compiling codesnippet plugin contrib.

I am using Debian 4.0 w/ wxGTK 2.8.0 Unicode/monolith.

Any direction would be appreciated, thanks ;)

Diilbert


Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #1 on: April 22, 2007, 03:35:36 am »
Whenever you get errors, posting these errors is a good idea.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #2 on: April 22, 2007, 04:15:57 am »
Try this patch, I am using it against 2.8 CVS Branch, 2.8.0 may need more patches.

Tim S

Code
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.h
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.h (revision 3869)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.h (working copy)
@@ -40,7 +40,7 @@
 #endif
 
 WX_DEFINE_ARRAY(wxDialog*, DlgPtrArray);
-WX_DEFINE_ARRAY(int, DlgRetcodeArray);
+WX_DEFINE_ARRAY_INT(int, DlgRetcodeArray);
 
 // ----------------------------------------------------------------------------
 class CodeSnippetsTreeCtrl : public wxTreeCtrl
« Last Edit: April 22, 2007, 04:18:12 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #3 on: April 22, 2007, 05:53:05 am »
Try this patch, I am using it against 2.8 CVS Branch, 2.8.0 may need more patches.

Tim S

Code
Index: src/plugins/contrib/codesnippets/codesnippetstreectrl.h
===================================================================
--- src/plugins/contrib/codesnippets/codesnippetstreectrl.h (revision 3869)
+++ src/plugins/contrib/codesnippets/codesnippetstreectrl.h (working copy)
@@ -40,7 +40,7 @@
 #endif
 
 WX_DEFINE_ARRAY(wxDialog*, DlgPtrArray);
-WX_DEFINE_ARRAY(int, DlgRetcodeArray);
+WX_DEFINE_ARRAY_INT(int, DlgRetcodeArray);
 
 // ----------------------------------------------------------------------------
 class CodeSnippetsTreeCtrl : public wxTreeCtrl

Will include in next commit.
BerliOS still down.

diilbert

  • Guest
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #4 on: April 22, 2007, 02:16:58 pm »
Sorry I forgot about that, here are the errors I am getting:

Code
In file included from codesnippets.cpp:42:
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h:18:30: error: gtk/gtkcontainer.h: No such file or directory
codesnippetstreectrl.h: In member function 'void DlgRetcodeArray::resize(size_t, _wxArrayDlgRetcodeArray)':
codesnippetstreectrl.h:43: error: invalid conversion from '_wxArrayDlgRetcodeArray' to 'const void*'
codesnippetstreectrl.h:43: error:   initializing argument 2 of 'void wxBaseArrayPtrVoid::resize(size_t, const void*)'
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h: At global scope:
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h:29: error: 'GtkContainer' does not name a type
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h:30: error: ISO C++ forbids declaration of 'GList' with no type
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h:30: error: expected ';' before '*' token
/usr/local/include/wx-2.8/wx/gtk/win_gtk.h:39: error: 'GtkType' does not name a type
codesnippets.cpp: In member function 'void CodeSnippets::OnTreeCtrlEvent(wxTreeEvent&)':
codesnippets.cpp:829: error: 'GDK_ROOT_PARENT' was not declared in this scope
codesnippets.cpp:829: error: 'GDK_WINDOW_XDISPLAY' was not declared in this scope
codesnippets.cpp:831: error: 'GDK_WINDOW_XID' was not declared in this scope
codesnippets.cpp:836: error: 'GdkDisplay' was not declared in this scope
codesnippets.cpp:836: error: 'display' was not declared in this scope
codesnippets.cpp:836: error: 'gdk_display_get_default' was not declared in this scope
codesnippets.cpp:838: error: 'gdk_display_get_window_at_pointer' was not declared in this scope
codesnippets.cpp:841: error: 'GdkEventButton' was not declared in this scope
codesnippets.cpp:841: error: expected `;' before 'evb'
codesnippets.cpp:842: error: 'evb' was not declared in this scope
codesnippets.cpp:843: error: 'GDK_BUTTON_RELEASE' was not declared in this scope
codesnippets.cpp:847: error: 'GDK_BUTTON1_MASK' was not declared in this scope
codesnippets.cpp:850: error: 'GdkEvent' was not declared in this scope
codesnippets.cpp:850: error: expected primary-expression before ')' token
codesnippets.cpp:850: error: 'gdk_display_put_event' was not declared in this scope
make[5]: *** [codesnippets.lo] Error 1
make[5]: Leaving directory `/home/hillsro/svn/codeblocks/src/plugins/contrib/codesnippets'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/hillsro/svn/codeblocks/src/plugins/contrib/codesnippets'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/hillsro/svn/codeblocks/src/plugins/contrib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/hillsro/svn/codeblocks/src/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/hillsro/svn/codeblocks/src'
make: *** [all-recursive] Error 1

Just to note I have applied the patch mentioned here as well.

Thanks again ;)

stahta01: that patch didn't fix my problem (since I never posted errors you had no idea what my problem was ;)
« Last Edit: April 22, 2007, 02:20:47 pm by diilbert »

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #5 on: April 22, 2007, 02:52:04 pm »
Use this codesnippets-unix.cbp to recompiler.

Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="CodeSnippets-unix" />
<Option pch_mode="2" />
<Option default_target="Debug-App" />
<Option compiler="gcc" />
<Build>
<Target title="Plugin-unix">
<Option output="../../../devel/share/codeblocks/plugins/libcodesnippets.so" prefix_auto="0" extension_auto="0" />
<Option object_output=".obj/plugin/" />
<Option type="3" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add option="-DBUILDING_PLUGIN" />
<Add option="-DNO_LOGGING" />
</Compiler>
<Linker>
<Add library="codeblocks" />
</Linker>
</Target>
<Target title="App-unix">
<Option output="../../../devel/share/codeblocks/plugins/codesnippets" prefix_auto="0" extension_auto="0" />
<Option object_output=".obj/app" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add option="-DNO_LOGGING" />
<Add option="-DWX_PRECOMP" />
</Compiler>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="Plugin-unix;App-unix;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-Ulinux" />
<Add option="-Uunix" />
<Add option="`wx-config --cflags`" />
<Add option="-fexceptions" />
<Add option="-Winvalid-pch" />
<Add option="-fPIC" />
<Add option="`pkg-config --cflags gtk+-2.0`" />
<Add option="-DWXUSINGDLL" />
<Add option="-DcbDEBUG" />
<Add option="-DCB_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#cb)/include" />
<Add directory="$(#cb)/include/wxscintilla/include" />
<Add directory="$(#cb)/include/wxFlatNotebook/include" />
</Compiler>
<Linker>
<Add option="`wx-config --libs`" />
<Add library="txml" />
<Add library="wxscintilla" />
<Add directory="../../../devel" />
<Add directory="../../../base/tinyxml" />
</Linker>
<ExtraCommands>
<Add after="./update" />
</ExtraCommands>
<Unit filename="Makefile.am" />
<Unit filename="codesnippets.cpp">
<Option target="Plugin-unix" />
</Unit>
<Unit filename="codesnippets.h" />
<Unit filename="codesnippetsapp.cpp">
<Option target="App-unix" />
</Unit>
<Unit filename="codesnippetsapp.h">
<Option target="App-unix" />
</Unit>
<Unit filename="codesnippetstreectrl.cpp" />
<Unit filename="codesnippetstreectrl.h" />
<Unit filename="codesnippetswindow.cpp" />
<Unit filename="codesnippetswindow.h" />
<Unit filename="defsext.h" />
<Unit filename="edit.cpp" />
<Unit filename="edit.h" />
<Unit filename="editsnippetframe.cpp" />
<Unit filename="editsnippetframe.h" />
<Unit filename="finddialogs.cpp" />
<Unit filename="finddialogs.h" />
<Unit filename="menuidentifiers.h" />
<Unit filename="messageBoxForm.cpp" />
<Unit filename="messageBoxForm.h" />
<Unit filename="messagebox.cpp" />
<Unit filename="messagebox.h" />
<Unit filename="prefs.cpp" />
<Unit filename="prefs.h" />
<Unit filename="settingsdlg.cpp" />
<Unit filename="settingsdlg.h" />
<Unit filename="settingsdlgform.cpp" />
<Unit filename="settingsdlgform.h" />
<Unit filename="snippetitemdata.cpp" />
<Unit filename="snippetitemdata.h" />
<Unit filename="snippetproperty.cpp" />
<Unit filename="snippetproperty.h" />
<Unit filename="snippetpropertyform.cpp" />
<Unit filename="snippetpropertyform.h" />
<Unit filename="snippetsconfig.cpp" />
<Unit filename="snippetsconfig.h" />
<Unit filename="snippetsimages.cpp" />
<Unit filename="snippetsimages.h" />
<Unit filename="update" />
<Unit filename="update.bat" />
<Unit filename="version.cpp" />
<Unit filename="version.h" />
<Extensions>
<code_completion />
</Extensions>
</Project>
</CodeBlocks_project_file>


diilbert

  • Guest
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #6 on: April 22, 2007, 03:29:55 pm »
Is there any chance of finding out what you changed, since I am using make & not C::B to build C::B ;)

Thanks.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #7 on: April 22, 2007, 06:52:03 pm »
Pecan's modified cbp mainly just removed editsnippetdlg.cpp and editsnippetdlg.h, I have no idea why.
Tim S


Code
Index: src/plugins/contrib/codesnippets/Makefile.am
===================================================================
--- src/plugins/contrib/codesnippets/Makefile.am (revision 3879)
+++ src/plugins/contrib/codesnippets/Makefile.am (working copy)
@@ -19,7 +19,6 @@
  codesnippetstreectrl.cpp \
  codesnippetswindow.cpp \
  edit.cpp \
- editsnippetdlg.cpp \
  editsnippetframe.cpp \
  messagebox.cpp \
  messageBoxForm.cpp \
@@ -40,7 +39,6 @@
  codesnippetswindow.h \
  defsext.h \
  edit.h \
- editsnippetdlg.h \
  editsnippetframe.h \
  menuidentifiers.h \
  messagebox.h \
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #8 on: April 22, 2007, 08:12:14 pm »
Pecan's modified cbp mainly just removed editsnippetdlg.cpp and editsnippetdlg.h, I have no idea why.
Tim S


Code
Index: src/plugins/contrib/codesnippets/Makefile.am
===================================================================
--- src/plugins/contrib/codesnippets/Makefile.am (revision 3879)
+++ src/plugins/contrib/codesnippets/Makefile.am (working copy)
@@ -19,7 +19,6 @@
  codesnippetstreectrl.cpp \
  codesnippetswindow.cpp \
  edit.cpp \
- editsnippetdlg.cpp \
  editsnippetframe.cpp \
  messagebox.cpp \
  messageBoxForm.cpp \
@@ -40,7 +39,6 @@
  codesnippetswindow.h \
  defsext.h \
  edit.h \
- editsnippetdlg.h \
  editsnippetframe.h \
  menuidentifiers.h \
  messagebox.h \

It also added pkg-config to the compile options(at some point), but I cannot tell weither it got into berliOS or not. I cannot access berliOS since Friday afternoon.

I can't tell if the "pkg-config" statement is missing, or Killer's make just missed it.

Yes, I took out editSnippetDlg.cpp/h . Don't need 'em anymore.




« Last Edit: April 22, 2007, 08:16:59 pm by Pecan »

diilbert

  • Guest
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #9 on: April 23, 2007, 01:01:47 pm »
I am still getting these errors even building with wxGTK 2.6.3 and --enable contrib. 

Any ideas would be appreciated.  I have tried checking out a fresh copy from the SVN, recompiling wxGTK (with unicode, shared & as a monolith) without any success.

Thanks.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Problem compiling C::B w/ wxGTK 2.8.0
« Reply #10 on: April 23, 2007, 05:56:05 pm »
Verify that you have the GTK 2 development files installed on your computer. (libwxgtk2.6-dev)

Per http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org