Opened 11 years ago

Closed 11 years ago

#525 closed defect (fixed)

error: ‘wxGCDC’ has not been declared

Reported by: neteler Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: wxGUI Version: svn-develbranch6
Keywords: vdigit Cc:
CPU: x86-64 Platform: Linux

Description

I don't manage for a while to compile wx-vdigit on Mandriva 2009.0:

cd gui/wxpython/vdigit/
make
...
c++ -I/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/include  -g -Wall   
-fPIC -I/usr/local/include -I/usr/include/python2.5 -I/usr/include/python2.5 
-fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
-fstack-protector --param=ssp-buffer-size=4 -g -I/usr/lib64/wx/include/ 
-I/usr/lib64/wx/include/gtk2-ansi-release-2.8 -I/usr/include/wx-2.8 
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread   -DPACKAGE=\""grasslibs"\"  
-I/home/neteler/grass64/dist.x86_64-unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/grass6_wxvdigit_wrap.o -c grass6_wxvdigit_wrap.cpp                                                                                                     
In file included from grass6_wxvdigit_wrap.cpp:4687:                                                                  
/usr/lib64/wx/include/wx/wxPython/wxPython.h: In function ‘bool wxPyCoreAPI_IMPORT()’:
/usr/lib64/wx/include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to ‘char*’
/usr/lib64/wx/include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from string constant to ‘char*’
grass6_wxvdigit_wrap.cpp: At global scope:
grass6_wxvdigit_wrap.cpp:4697: error: ‘wxGCDC’ has not been declared
grass6_wxvdigit_wrap.cpp:4703: error: ‘wxGCDC’ has not been declared
grass6_wxvdigit_wrap.cpp: In function ‘PyObject* _wrap_PseudoDC_DrawToDC__SWIG_1(PyObject*, PyObject*)’:
grass6_wxvdigit_wrap.cpp:13341: error: ‘wxGCDC’ was not declared in this scope
grass6_wxvdigit_wrap.cpp:13341: error: ‘arg2’ was not declared in this scope
grass6_wxvdigit_wrap.cpp:13341: error: expected primary-expression before ‘)’ token
...

Digging around I found this comment:

"I went and told it specifically to enable the graphics context during configure. Seems to be working now"

http://thread.gmane.org/gmane.comp.lib.wxwidgets.general/56401/focus=56446

(whatever that means)

Also found comments here: http://lists.wxwidgets.org/pipermail/wx-dev/2007-November/094820.html

"If I use wxGCDC, I get the following error:

error: ‘wxGCDC’ was not declared in this scope;

even if I include <wx/dcgraph.h>.

I think, I have to configure wxWidgets with an additional --enable-graphics_ctx - flag."

Looking for the definition, I find:

grep wxGCDC /usr/include/wx-2.8/wx*/*
/usr/include/wx-2.8/wx/dcgraph.h:#define wxGCDC wxDC
/usr/include/wx-2.8/wx/dcgraph.h:class WXDLLEXPORT wxGCDC:
/usr/include/wx-2.8/wx/dcgraph.h:    DECLARE_DYNAMIC_CLASS(wxGCDC)
/usr/include/wx-2.8/wx/dcgraph.h:    DECLARE_NO_COPY_CLASS(wxGCDC)
/usr/include/wx-2.8/wx/dcgraph.h:    wxGCDC(const wxWindowDC& dc);
/usr/include/wx-2.8/wx/dcgraph.h:    wxGCDC( const wxMemoryDC& dc);
/usr/include/wx-2.8/wx/dcgraph.h:    wxGCDC();
/usr/include/wx-2.8/wx/dcgraph.h:    virtual ~wxGCDC();

Not sure what's missing here. Maybe missing

#include <wx/dcgraph.h>

?

Change History (1)

comment:1 Changed 11 years ago by martinl

Resolution: fixed
Status: newclosed

Has been fixed in all active branches.

Note: See TracTickets for help on using tickets.