Menu

#213 myipc.cpp:136: error: ‘gtk_widget_get_window’ was not declared in this scope

1.3.0.0
closed-fixed
nobody
None
5
2022-10-16
2014-11-21
No

When I try to compile I get:

myipc.cpp: In constructor ‘MyServerConnection::MyServerConnection()’:
myipc.cpp:49: warning: converting to non-pointer type ‘GdkNativeWindow’ from NULL
myipc.cpp: In member function ‘virtual bool MyServerConnection::OnPoke(const wxString&, const wxString&, IPCData, IPCSize_t, wxIPCFormat)’:
myipc.cpp:101: error: ‘gtk_widget_get_window’ was not declared in this scope
myipc.cpp: In member function ‘virtual IPCData
MyServerConnection::OnRequest(const wxString&, const wxString&, IPCSize_t, wxIPCFormat)’:
myipc.cpp:136: error: ‘gtk_widget_get_window’ was not declared in this scope
myipc.cpp:146: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[1]:
** [myipc.o] Error 1

Discussion

  • Zane U. Ji

    Zane U. Ji - 2014-11-22

    I was wondering what OS XML Copy Editor was built on.

     
  • Michael Carter

    Michael Carter - 2014-11-22

    Ultimately need it to run on RedHat 5.8.

    I've been trying to compile on Fedora 20 and downloading all the latest required libraries and trying to compile on RedHat 5.8

    Same results.

     
  • Zane U. Ji

    Zane U. Ji - 2014-11-22

    You can add the following line to the beginning of the file:

    #define __NO_GTK__
    

    so that the file can be compiled. I haven't compiled it on RedHat.

     
    • Michael Carter

      Michael Carter - 2014-11-23

      Got further. Now at the following. Concentrating on the RH5 install. Also trying to keep download and compile all the required bits manually so that I can track what libraries are needed. (also get the static libraries as I want to get this as standalone as possible)

      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h: In member function ‘virtual bool wxBitmapBase::CreateScaled(int, int, int, double)’:
      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h:178: warning: passing ‘double’ for argument 1 to ‘virtual bool wxBitmapBase::Create(int, int, int)’
      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h:178: warning: passing ‘double’ for argument 2 to ‘virtual bool wxBitmapBase::Create(int, int, int)’
      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h: In member function ‘virtual wxSize wxBitmapBase::GetScaledSize() const’:
      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h:192: warning: passing ‘double’ for argument 1 to ‘wxSize::wxSize(int, int)’
      /stage/xml-pack/INSTALL/include/wx-3.0/wx/bitmap.h:192: warning: passing ‘double’ for argument 2 to ‘wxSize::wxSize(int, int)’
      wraplibxml.cpp: In static member function ‘static xmlChar* WrapLibxml::xmlFileNameToURL(const wxString&)’:
      wraplibxml.cpp:797: error: ‘xmlPathToURI’ was not declared in this scope
      make[1]: [wraplibxml.o] Error 1
      make[1]: Leaving directory `/stage/xml-pack/xmlcopyeditor-1.2.1.3/src'
      make:
      [all-recursive] Error 1

       
      • Michael Carter

        Michael Carter - 2014-11-23

        Nevermind... somewhat answered my own question in there. Had to add -I/stage/xml-pack/INSTALL/include/libxml2

         
  • Zane U. Ji

    Zane U. Ji - 2014-11-22

    It's strange. After I run the following commands:

    su -c "yum -y install gtk2-devel"
    ./autogen.sh && CPPFLAGS="-Wno-unused-local-typedefs -Wno-unused-value" ./configure && make
    

    on Fedora 20, XML Copy Editor was built successfully.

     
  • Zane U. Ji

    Zane U. Ji - 2014-11-23

    Good to know. I realized that the NO_GTK macro is not as rigorous as I expected. A traditional macro that start with "HAVE_" should be used. I'll fix it ASAP.

     
  • Zane U. Ji

    Zane U. Ji - 2014-11-23
    • status: open --> open-accepted
    • Group: Bugs --> Next Release
     
  • Michael Carter

    Michael Carter - 2014-11-23

    Might not be the right place for this question but it's related to getting this compiled on RH5.

    Any way to trigger xmlcopyeditor to use .a (static) libraries over .so (shared) Since RH5 is using libraries too old I'd rather do the static route for the "upgraded" libraries.

     
  • Zane U. Ji

    Zane U. Ji - 2014-11-24

    The link option is -static if I am not mistaken. https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html

     
  • Zane U. Ji

    Zane U. Ji - 2022-10-16
    • status: open-accepted --> closed-fixed
     
  • Zane U. Ji

    Zane U. Ji - 2022-10-16

    It should have been fixed in [3f87d8].

     

    Related

    Commit: [3f87d8]

  • Zane U. Ji

    Zane U. Ji - 2022-10-16
    • Group: Next Release --> 1.3.0.0
     

Log in to post a comment.