Hi cruisersforum community. I tryed to compile OCPN to android and faced with some compile errors. I acted according to the instruction that lies in {ocpnroot} /bulldandroid /REAMDE and stuck at " 5. Build OCPN" position. Compiller gave me those errors
Code:
In file included from /home/virtualbox/Project/OpenCPN/src/s52plib.cpp:59:0:
/home/virtualbox/Project/OpenCPN/include/glChartCanvas.h:63:30: error: invalid use of incomplete type 'class wxGLCanvas'
class glChartCanvas : public wxGLCanvas
^
In file included from /home/virtualbox/Project/OpenCPN/include/s57chart.h:49:0,
from /home/virtualbox/Project/OpenCPN/src/s52plib.cpp:41:
/home/virtualbox/Project/OpenCPN/include/ocpndc.h:54:7: error: forward declaration of 'class wxGLCanvas'
class wxGLCanvas;
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp: In member function 'render_canvas_parms* s52plib::CreatePatternBufferSpec(ObjRazRules*, Rules*, ViewPort*, bool, bool)':
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:9: error: 'wxGraphicsContext' was not declared in this scope
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:28: error: 'pgc' was not declared in this scope
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:38: error: 'class wxMemoryDC' has no member named 'GetGraphicsContext'
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8206:35: error: 'wxANTIALIAS_NONE' was not declared in this scope
pgc->SetAntialiasMode(wxANTIALIAS_NONE);
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp: In member function 'bool RenderFromHPGL::Render(char*, char*, wxPoint&, wxPoint&, wxPoint, float, double)':
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:9180:21: error: 'GL_CURRENT_COLOR' was not declared in this scope
glGetFloatv(GL_CURRENT_COLOR,m_currentColor);
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:9305:36: error: 'glColor4fv' was not declared in this scope
glColor4fv( m_currentColor );
^
Looks like it causes because wxqt configured without opengl support. But Reamde says:
Quote:
___Configure wxWidgets for Qt
$../configure --with-qt --build=x86_64-unknown-linux-gnu --host=arm-linux-androideabi --enable-compat28 --disable-shared --disable-arttango --enable-image --disable-dragimage --disable-sockets --with-libtiff=no --without-opengl --disable-baseevtloop --disable-xrc --disable-cmdline --disable-miniframe --disable-mdi --enable-debug --disable-stc --disable-ribbon --disable-propgrid --disable-timepick --disable-datepick --disable-xlocale --disable-intl
|
I compiled wxqt with enabled opengl (pass --with-opengl as configure key), but it caused other errors.
Code:
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:9: error: 'wxGraphicsContext' was not declared in this scope
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:28: error: 'pgc' was not declared in this scope
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8204:38: error: 'class wxMemoryDC' has no member named 'GetGraphicsContext'
wxGraphicsContext* pgc = mdc.GetGraphicsContext();
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:8206:35: error: 'wxANTIALIAS_NONE' was not declared in this scope
pgc->SetAntialiasMode(wxANTIALIAS_NONE);
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp: In member function 'bool RenderFromHPGL::Render(char*, char*, wxPoint&, wxPoint&, wxPoint, float, double)':
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:9180:21: error: 'GL_CURRENT_COLOR' was not declared in this scope
glGetFloatv(GL_CURRENT_COLOR,m_currentColor);
^
/home/virtualbox/Project/OpenCPN/src/s52plib.cpp:9305:36: error: 'glColor4fv' was not declared in this scope
glColor4fv( m_currentColor );
Ubuntu 16 x64; qt 5.2.1; OCPN 4.8.0 (master brunch)