Comments (11)
Ok, got it building, but remains a boring:
GLX: Failed to create context: GLXBadFBConfig"
I tried to change the OpenGL major/minor version, but probably something is missing. Todo (Linux only): ApplicationFilePatht() to be implemented, maybe boost could help (not sure)
Below, the attached diff to show what I did, to achieve the compilation. Lot of warnings though.
LinuxBuild_FishGUI.diff.txt](https://github.com/yushroom/FishGUI/files/1635300/LinuxBuild_FishGUI.diff.txt)
from fishgui.
You are right, ApplicationFilePath() is missing on Linux. I'm working on it now.
from fishgui.
@ebachard
Done. Tested on Ubuntu.
See readme for build instructions.
from fishgui.
Thanks a lot for all the changes you did, very appreciated. Nevertheless, I still have some breakages and I'm wondering what I did so wrong ...
e.g. in ListWidget.hpp use m_rect.x directly is not possible, since m_rect is private. Maybe I'm not correct, but the attached patch fixed (partially) the build on Linux Intel (x86_64) + LinuxMint 18.3
Please have a look at this : https://gist.github.com/ebachard/8728ea69b7887b834146b0400052e95a#file-fishgui2-diff
Last but not least, what remains to be fixed :
Scanning dependencies of target Demo
[ 84%] Building CXX object CMakeFiles/Demo.dir/examples/demo1/main.cpp.o
In file included from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/TreeWidget.hpp:3:0,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/../common/HierarchyWidget.hpp:3,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:11:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp: In instantiation of ‘void FishGUI::TItemView<T>::HandleKeyEvent() [with T = FileNode*]’:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp:351:18: required from ‘void FishGUI::TItemView<T>::DrawImpl() [with T = FileNode*]’
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:196:1: required from here
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp:197:23: error: no matching function for call to ‘find(std::vector<FileNode*>::iterator, std::vector<FileNode*>::iterator, FileNode*&)’
auto it = std::find(m_visibleItems.begin(), m_visibleItems.end(), first);
^
In file included from /usr/include/c++/5/bits/locale_facets.h:48:0,
from /usr/include/c++/5/bits/basic_ios.h:37,
from /usr/include/c++/5/ios:44,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:5:
/usr/include/c++/5/bits/streambuf_iterator.h:369:5: note: candidate: template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)
find(istreambuf_iterator<_CharT> __first,
^
/usr/include/c++/5/bits/streambuf_iterator.h:369:5: note: template argument deduction/substitution failed:
In file included from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/TreeWidget.hpp:3:0,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/../common/HierarchyWidget.hpp:3,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:11:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp:197:23: note: ‘__gnu_cxx::__normal_iterator<FileNode**, std::vector<FileNode*> >’ is not derived from ‘std::istreambuf_iterator<_CharT>’
auto it = std::find(m_visibleItems.begin(), m_visibleItems.end(), first);
^
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp: In instantiation of ‘bool FishGUI::TItemSelectionModel<T>::IsSelected(T) [with T = FileNode*]’:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ListWidget.hpp:96:7: required from ‘void FishGUI::ListWidget<T>::Render() [with T = FileNode*]’
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:196:1: required from here
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp:96:23: error: no matching function for call to ‘find(std::__cxx11::list<FileNode*, std::allocator<FileNode*> >::iterator, std::__cxx11::list<FileNode*, std::allocator<FileNode*> >::iterator, FileNode*&)’
auto it = std::find(m_selection.begin(), m_selection.end(), item);
^
In file included from /usr/include/c++/5/bits/locale_facets.h:48:0,
from /usr/include/c++/5/bits/basic_ios.h:37,
from /usr/include/c++/5/ios:44,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:5:
/usr/include/c++/5/bits/streambuf_iterator.h:369:5: note: candidate: template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(std::istreambuf_iterator<_CharT>, std::istreambuf_iterator<_CharT>, const _CharT2&)
find(istreambuf_iterator<_CharT> __first,
^
/usr/include/c++/5/bits/streambuf_iterator.h:369:5: note: template argument deduction/substitution failed:
In file included from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/TreeWidget.hpp:3:0,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/../common/HierarchyWidget.hpp:3,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/examples/demo1/main.cpp:11:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/include/FishGUI/ModelView/ItemView.hpp:96:23: note: ‘std::_List_iterator<FileNode*>’ is not derived from ‘std::istreambuf_iterator<_CharT>’
auto it = std::find(m_selection.begin(), m_selection.end(), item);
^
CMakeFiles/Demo.dir/build.make:62 : la recette pour la cible « CMakeFiles/Demo.dir/examples/demo1/main.cpp.o » a échouée
make[2]: *** [CMakeFiles/Demo.dir/examples/demo1/main.cpp.o] Erreur 1
CMakeFiles/Makefile2:106 : la recette pour la cible « CMakeFiles/Demo.dir/all » a échouée
make[1]: *** [CMakeFiles/Demo.dir/all] Erreur 2
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/build/Makefile:127 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
I'll continue to investigate what still causes the breakage.
To be continued :-)
from fishgui.
OK, fixed : was a missing #include in include/FishGUI/ModelView/ItemView.hpp
=> see the full attached patch
fishGUI2.diff.txt
from fishgui.
Still the GLX: Failed to create context.
eric@PasMaMachine ~/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI2/bin $ ./Demo
GLX: Failed to create context: GLXBadFBConfig
Investigating ...
from fishgui.
Got it working, finaly :-)
Was the OpenGL version. Changing for 3.2 works now.
+#ifdef Linux
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
+#else
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
+#endif
Wow, the layout is really nice, great work !
Last but not least, the whole changes are attached. Feel free to use what you consider important.
from fishgui.
thank you for your interest.
I made a new commit to fix, 0f7f074.
from fishgui.
Thanks for your changes, very helpfull.
Still not fixed for me. If this can help, I started a new build (after a simple git clone + mkdir build && cd build && cmake .. && make ), but the build is still broken. Maybe this is my compiler ? Below the log, where I still have visibility issues (m_rect seen as private if I'm not wrong) :
[ 84%] Building CXX object CMakeFiles/Demo.dir/examples/demo1/main.cpp.o
In file included from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/examples/demo1/../common/HierarchyWidget.hpp:3:0,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/examples/demo1/main.cpp:11:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/TreeWidget.hpp: In member function ‘void FishGUI::TreeWidget<T>::Cell(T)’:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/TreeWidget.hpp:108:30: error: ‘class FishGUI::Widget’ has no member named ‘x’
totalCellRect.x = m_rect.x;
^
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/TreeWidget.hpp:109:34: error: ‘class FishGUI::Widget’ has no member named ‘width’
totalCellRect.width = m_rect.width;
^
In file included from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/examples/demo1/../common/FileListWidget.hpp:4:0,
from /home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/examples/demo1/main.cpp:13:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/ListWidget.hpp: In member function ‘virtual void FishGUI::ListWidget<T>::Render()’:
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/ListWidget.hpp:54:17: error: ‘class FishGUI::Widget’ has no member named ‘x’
r.x = m_rect.x;
^
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/ListWidget.hpp:55:34: error: ‘class FishGUI::Widget’ has no member named ‘y’
r.y = static_cast<int>(m_rect.y + m_imContext->yStart);
^
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/ListWidget.hpp:59:65: error: ‘class FishGUI::Widget’ has no member named ‘x’
const float totalWidth = float(m_imContext->Right() - m_rect.x);
^
/home/eric/Devel/minidart/miniDart_0.7/IMPORTANT/fishGUI3/include/FishGUI/ModelView/ListWidget.hpp:81:19: error: ‘class FishGUI::Widget’ has no member named ‘x’
r.x = m_rect.x + r.width * col;
^
CMakeFiles/Demo.dir/build.make:62 : la recette pour la cible « CMakeFiles/Demo.dir/examples/demo1/main.cpp.o » a échouée
make[2]: *** [CMakeFiles/Demo.dir/examples/demo1/main.cpp.o] Erreur 1
CMakeFiles/Makefile2:106 : la recette pour la cible « CMakeFiles/Demo.dir/all » a échouée
make[1]: *** [CMakeFiles/Demo.dir/all] Erreur 2
Makefile:127 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
from fishgui.
What is your gcc version? It seems that it can not handle two phase name lookup correctly. m_rect is a protected member of Widget.
Try to replace m_rect with this->m_rect.
from fishgui.
~ $ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I agree, it should work, but I dunno what happens. And indeed, this-> works as expected (I'm dumb, I should have thought to that before ...)
With the last attached diff (as .txt), you can consider the issue as fixed. Thanks a lot for your help, and your great work !
To be continued :-)
from fishgui.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fishgui.