GLUI build issues on Linux
A minimal wxWidgets wrapper for VR capable UI based on GLUI.
Brought to you by:
mick-p
$ mkdir build
$ cd build/
$ cmake ..
-- The CXX compiler identification is GNU 7.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Compiling GLUI Library Version 3.00
-- Using cmake version 3.10
-- Installing to /usr/local
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- Found GLUT: /usr/lib/x86_64-linux-gnu/libglut.so
-- Found OpenGL: /usr/local/lib/libOpenGL.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nigels/dev/glui/build
$ make
Scanning dependencies of target glui_obj
[ 2%] Building CXX object CMakeFiles/glui_obj.dir/src/glui.cpp.o
In file included from /home/nigels/dev/glui/src/../include/glui_internal.h:74:0,
from /home/nigels/dev/glui/src/glui.cpp:33:
/home/nigels/dev/glui/src/../include/GL/glui.hpp:441:23: error: storage size of ‘GLUI_Library::std_bitmaps’ isn’t known
LINKAGE const Bitmap *std_bitmaps[/*Bitmap::_NUM_ITEMS*/];
^~~~~~~~~~~
/home/nigels/dev/glui/src/../include/GL/glui.hpp:497:27: error: expected nested-name-specifier before ‘T’
inline operator typename T*()const
^
In file included from /home/nigels/dev/glui/src/../include/glui_internal.h:74:0,
from /home/nigels/dev/glui/src/glui.cpp:33:
/home/nigels/dev/glui/src/../include/GL/glui.hpp: In member function ‘int GLUI_Library::Text_Interface::scrollbar_val()’:
/home/nigels/dev/glui/src/../include/GL/glui.hpp:2671:10: error: could not convert ‘((GLUI_Library::Text_Interface*)this)->GLUI_Library::Text_Interface::<anonymous>.GLUI_Library::Box_Interface::<anonymous>.GLUI_Library::UI::Control::<anonymous>.GLUI_Library::Interface<GLUI_Library::UI::Control, GLUI_Library::Node>::<anonymous>.GLUI_Library::Node::<anonymous>.GLUI_Library::Node::<unnamed union>::scrollbar’ from ‘GLUI_Library::NodePtr<GLUI_Library::Meta::ScrollBar>’ to ‘bool’
return scrollbar?scrollbar->int_val:0;
^~~~~~~~~
/home/nigels/dev/glui/src/../include/GL/glui.hpp: In member function ‘int GLUI_Library::Text_Interface::scrollbar_bot()’:
/home/nigels/dev/glui/src/../include/GL/glui.hpp:2675:10: error: could not convert ‘((GLUI_Library::Text_Interface*)this)->GLUI_Library::Text_Interface::<anonymous>.GLUI_Library::Box_Interface::<anonymous>.GLUI_Library::UI::Control::<anonymous>.GLUI_Library::Interface<GLUI_Library::UI::Control, GLUI_Library::Node>::<anonymous>.GLUI_Library::Node::<anonymous>.GLUI_Library::Node::<unnamed union>::scrollbar’ from ‘GLUI_Library::NodePtr<GLUI_Library::Meta::ScrollBar>’ to ‘bool’
return scrollbar?(int)scrollbar->val_start:0;
^~~~~~~~~
/home/nigels/dev/glui/src/glui.cpp: In static member function ‘static void GLUI_Library::UI::_glut_friends::idle()’:
/home/nigels/dev/glui/src/glui.cpp:454:5: error: ‘usleep’ was not declared in this scope
usleep(1000);
^~~~~~
/home/nigels/dev/glui/src/glui.cpp:454:5: note: suggested alternative: ‘user’
usleep(1000);
^~~~~~
user
In file included from /usr/include/c++/7/cassert:44:0,
from /home/nigels/dev/glui/src/../include/GL/glui.hpp:57,
from /home/nigels/dev/glui/src/../include/glui_internal.h:74,
from /home/nigels/dev/glui/src/glui.cpp:33:
/home/nigels/dev/glui/src/../include/GL/glui.hpp: In instantiation of ‘T* GLUI_Library::NodePtr<T>::operator->() const [with T = GLUI_Library::Meta::ScrollBar]’:
/home/nigels/dev/glui/src/../include/GL/glui.hpp:2671:29: required from here
/home/nigels/dev/glui/src/../include/GL/glui.hpp:494:3: error: invalid static_cast from type ‘const GLUI_Library::NodePtr<GLUI_Library::Meta::ScrollBar>’ to type ‘bool’
assert(*this); return (T*)_union;
^
/home/nigels/dev/glui/src/../include/GL/glui.hpp: In instantiation of ‘T* GLUI_Library::NodePtr<T>::operator->() const [with T = GLUI_Library::UI::EditText]’:
/home/nigels/dev/glui/src/../include/GL/glui.hpp:2953:48: required from here
/home/nigels/dev/glui/src/../include/GL/glui.hpp:494:3: error: invalid static_cast from type ‘const GLUI_Library::NodePtr<GLUI_Library::UI::EditText>’ to type ‘bool’
CMakeFiles/glui_obj.dir/build.make:62: recipe for target 'CMakeFiles/glui_obj.dir/src/glui.cpp.o' failed
make[2]: *** [CMakeFiles/glui_obj.dir/src/glui.cpp.o] Error 1
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/glui_obj.dir/all' failed
make[1]: *** [CMakeFiles/glui_obj.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Fixed here: https://github.com/mick-p1982/glui/commit/cb926a6
These were introduced by some follow-up commits I made, and did not test on GCC.
NOTE TO READERS: This link is not the home of Widgets 95. It's some preliminary work I'm doing. There will be code here in not long. I follow bug reports at https://github.com/mick-p1982/glui too.
Thanks for that.
Got it: https://github.com/mick-p1982/glui/commit/cd16514 (missed one... almost bungled this commit... it's a twofer)
It builds on Ubuntu 18.04. Yay! Thanks.