Hi,

I've had my share of problems with this of late as well, but managed to get everything working. You have to indeed manually enable OpenGL support when building wxWidgets.

To do so, you need to edit the 'master setup.h file'. This file can be found at "include/wx/<your build platform>" (as described at <http://wiki.wxwidgets.org/Setup.H>). Change the value of "WX_USE_GLCANVAS" from 0 to 1. Then, rebuild the lot.

Frank

D.J. Caldwell wrote:
Whatever your wxWidgets version, I believe you must explicitly enable OpenGL support when building wxWidgets (OpenGL support is disabled by default). D.J.

On Wed, Oct 29, 2008 at 11:46 AM, <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I thought the latest version should work, but when I try to build
    the osgviewerWX examples I get the following errors.... Maybe I am
    missing something....


    Scanning dependencies of target example_osgviewerWX
    [ 98%] Building CXX object
    examples/osgviewerWX/CMakeFiles/example_osgviewerWX.dir/osgviewerWX.o
    In file included from
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:18:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.h:14:
    error: expected class-name before ?{? token
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?virtual bool wxOsgApp::OnInit()?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:49:
    error: ?WX_GL_DOUBLEBUFFER? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:50:
    error: ?WX_GL_RGBA? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:51:
    error: ?WX_GL_DEPTH_SIZE? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:53:
    error: ?WX_GL_STENCIL_SIZE? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    At global scope:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:114:
    error: ?wxGLCanvas? has not been declared
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:115:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxSizeEvent&)? to type ?void
    (wxEvtHandler::*)(wxSizeEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:116:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxPaintEvent&)? to type ?void
    (wxEvtHandler::*)(wxPaintEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:117:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxEraseEvent&)? to type ?void
    (wxEvtHandler::*)(wxEraseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:119:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxKeyEvent&)? to type ?void
    (wxEvtHandler::*)(wxKeyEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:120:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxKeyEvent&)? to type ?void
    (wxEvtHandler::*)(wxKeyEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:122:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:123:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:124:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:125:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:126:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:127:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:128:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:129:
    error: invalid static_cast from type ?void
    (OSGCanvas::*)(wxMouseEvent&)? to type ?void
    (wxEvtHandler::*)(wxMouseEvent&)?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In constructor ?OSGCanvas::OSGCanvas(wxWindow*, wxWindowID, const
    wxPoint&, const wxSize&, long int, const wxString&, int*)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:134:
    error: class ?OSGCanvas? does not have any field named ?wxGLCanvas?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?void OSGCanvas::OnPaint(wxPaintEvent&)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:147:
    error: no matching function for call to
    ?wxPaintDC::wxPaintDC(OSGCanvas* const)?
    /usr/local/include/wx-2.8/wx/gtk/dcclient.h:160: note: candidates
    are: wxPaintDC::wxPaintDC(wxWindow*)
/usr/local/include/wx-2.8/wx/gtk/dcclient.h:159: note: wxPaintDC::wxPaintDC() /usr/local/include/wx-2.8/wx/gtk/dcclient.h:157: note: wxPaintDC::wxPaintDC(const wxPaintDC&)
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?void OSGCanvas::OnSize(wxSizeEvent&)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:153:
    error: ?wxGLCanvas? has not been declared
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:157:
    error: ?GetClientSize? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?void OSGCanvas::OnMouseEnter(wxMouseEvent&)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:205:
    error: ?SetFocus? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?void OSGCanvas::UseCursor(bool)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:237:
    error: ?SetCursor? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:242:
    error: ?GetCursor? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:250:
    error: ?SetCursor? was not declared in this scope
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In constructor ?GraphicsWindowWX::GraphicsWindowWX(OSGCanvas*)?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:264:
    error: ?class OSGCanvas? has no member named ?GetPosition?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:265:
    error: ?class OSGCanvas? has no member named ?GetSize?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?virtual void GraphicsWindowWX::grabFocus()?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:301:
    error: ?class OSGCanvas? has no member named ?SetFocus?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?virtual void
    GraphicsWindowWX::grabFocusIfPointerInWindow()?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:308:
    error: comparison between distinct pointer types ?wxWindow*? and
    ?OSGCanvas*? lacks a cast
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:309:
    error: ?class OSGCanvas? has no member named ?SetFocus?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?virtual bool
    GraphicsWindowWX::makeCurrentImplementation()?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:319:
    error: ?class OSGCanvas? has no member named ?SetCurrent?
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:
    In member function ?virtual void
    GraphicsWindowWX::swapBuffersImplementation()?:
    
/home/epeddycoart/development/Libraries/OpenSceneGraph/examples/osgviewerWX/osgviewerWX.cpp:325:
    error: ?class OSGCanvas? has no member named ?SwapBuffers?
    make[2]: ***
    [examples/osgviewerWX/CMakeFiles/example_osgviewerWX.dir/osgviewerWX.o]
    Error 1
    make[1]: ***
    [examples/osgviewerWX/CMakeFiles/example_osgviewerWX.dir/all] Error 2
    make: *** [all] Error 2



    Quoting Maciej Krol <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

        Hi Ed,

        I am using 2.8.7, but the latest stable version should work as well.

        Regards,
        Maciej

        2008/10/29 Ed <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>

            If I want to use wxWidgets with OSG, do I need a particular
            version of
            wxWidgets?
            Ed

            _______________________________________________
            osg-users mailing list
            [email protected]
            <mailto:[email protected]>
            
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org





    _______________________________________________
    osg-users mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to