Author Topic: Builderror on wxGTK 2.8.7 on xubuntu 15.10 (wily)  (Read 4322 times)

Offline zainka

  • Multiple posting newcomer
  • *
  • Posts: 14
Builderror on wxGTK 2.8.7 on xubuntu 15.10 (wily)
« on: March 29, 2016, 11:24:13 pm »
I am following the tutorial for building CB at http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
I fail at building wxGTK 2.8.7 on monodll_gsockgtk.o when including gsocket.h. Seems to be some dependencies that is not met by xUbuntu15.10 which uses glib-2.0. However, I am not to experienced on these things (I am trying to learn how to create CB plugins) and need some advices.



Hope someone is able to help based on the below dump.

Breg
Vidar



Tried to

Code
../include/wx/gsocket.h:40:7: error: using typedef-name ‘GSocket’ after ‘class’
 class GSocket;
       ^
In file included from /usr/include/glib-2.0/gio/gio.h:26:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from ../src/gtk/gsockgtk.cpp:18:
/usr/include/glib-2.0/gio/giotypes.h:160:47: note: ‘GSocket’ has a previous declaration here
 typedef struct _GSocket                       GSocket;
                                               ^
In file included from ../include/wx/gsocket.h:179:0,
                 from ../src/gtk/gsockgtk.cpp:21:
../include/wx/unix/gsockunx.h:40:7: error: using typedef-name ‘GSocket’ after ‘class’
 class GSocket
       ^
In file included from /usr/include/glib-2.0/gio/gio.h:26:0,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from ../src/gtk/gsockgtk.cpp:18:
/usr/include/glib-2.0/gio/giotypes.h:160:47: note: ‘GSocket’ has a previous declaration here
 typedef struct _GSocket                       GSocket;
                                               ^
../src/gtk/gsockgtk.cpp: In function ‘void _GSocket_GDK_Input(gpointer, gint, GdkInputCondition)’:
../src/gtk/gsockgtk.cpp:34:13: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘Detected_Read’
     socket->Detected_Read();
             ^
../src/gtk/gsockgtk.cpp:36:13: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘Detected_Write’
     socket->Detected_Write();
             ^
../src/gtk/gsockgtk.cpp: In member function ‘virtual bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket*)’:
../src/gtk/gsockgtk.cpp:56:11: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_gui_dependent’
   socket->m_gui_dependent = (char *)malloc(sizeof(gint)*2);
           ^
../src/gtk/gsockgtk.cpp:57:27: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_gui_dependent’
   m_id = (gint *)(socket->m_gui_dependent);
                           ^
../src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket*)’:
../src/gtk/gsockgtk.cpp:67:16: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_gui_dependent’
   free(socket->m_gui_dependent);
                ^
../src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket*, GSocketEvent)’:
../src/gtk/gsockgtk.cpp:72:33: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_gui_dependent’
   gint *m_id = (gint *)(socket->m_gui_dependent);
                                 ^
../src/gtk/gsockgtk.cpp:75:15: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_fd’
   if (socket->m_fd == -1)
               ^
../src/gtk/gsockgtk.cpp:83:42: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_server’
     case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
                                          ^
../src/gtk/gsockgtk.cpp:90:35: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_fd’
   m_id[c] = gdk_input_add(socket->m_fd,
                                   ^
../src/gtk/gsockgtk.cpp: In member function ‘virtual void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket*, GSocketEvent)’:
../src/gtk/gsockgtk.cpp:98:33: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_gui_dependent’
   gint *m_id = (gint *)(socket->m_gui_dependent);
                                 ^
../src/gtk/gsockgtk.cpp:108:42: error: ‘GSocket {aka struct _GSocket}’ has no member named ‘m_server’
     case GSOCK_CONNECTION: c = ((socket->m_server) ? 0 : 1); break;
                                          ^
Makefile:14413: recipe for target 'monodll_gsockgtk.o' failed
make: *** [monodll_gsockgtk.o] Error 1

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7602
    • My Best Post
Re: Builderror on wxGTK 2.8.7 on xubuntu 15.10 (wily)
« Reply #1 on: March 30, 2016, 12:38:24 am »
I would try wxGTK-2.8.12 and see if that has the same error.
If yes, please post back.
Someone needs to update the Wiki page because I think CB needs wxWidgets 2.8.12 as the lowest version of wxWidgets that works.
But, I am NOT sure of that.

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

Offline zainka

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: Builderror on wxGTK 2.8.7 on xubuntu 15.10 (wily)
« Reply #2 on: March 30, 2016, 02:35:07 pm »
Hi

I have downloaded 2.8.12 and is happy to inform that this compiled without any hassle.
Thanks for pointing this out. Yes, the tutorial seems to need some update. When downloading the CB source, it someway down on the page states that it needs 2.8.12 ... My fault that I did not check this and just followed the tutorial. (http://www.codeblocks.org/downloads/25)

Looking at the wiki again, at the bottom, the last update is more than a year ago (This page was last modified on 23 February 2015, at 03:03.) Somebody worked late. Maybe there are other pits in the tutorial.....? For wxGTK the rest of the tutorial is ok except that for ubuntu one uses sudo in certain places and not su.

EDIT:
Succeeded in compiling and installing CB as-well. I have attached a file where I wrote down the steps that I had to do to succeed.

EDIT2: I reloaded the attachment as there was one error. In ld.so.conf I had written "include /opt/wx/2.8/lib". This is wrong. It should be the path only on a new line without the include tag. My fault.
« Last Edit: March 30, 2016, 07:32:43 pm by zainka »