ofxImGui addon
ryanlukejohns opened this issue · 5 comments
Checking here if anyone has had success building this with addon(ofxImGui)
? I am on Ubuntu 16.04, cloned ofxImGui into my ofNode/of/addons
folder and added
${OF_ROOT}/addons/ofxImGui/src
${OF_ROOT}/addons/ofxImGui/libs/imgui/src
)
ofxaddon(ofxImGui)
into the CMakeLists.txt of the plain ofnode/ofapp example. It runs fine without the addition of ofxImGui, but with the addon I get many errors such as
In file included from /home/rlj/git/ofNode/of/src/openframeworks/math/ofVec3f.h:5:0,
from /home/rlj/git/ofNode/of/src/openframeworks/types/ofPoint.h:3,
from /home/rlj/git/ofNode/of/src/openframeworks/types/ofParameter.h:5,
from /home/rlj/git/ofNode/of/src/openframeworks/utils/ofJson.h:4,
from /home/rlj/git/ofNode/of/src/openframeworks/ofMain.h:21,
from /home/rlj/git/ofNode/ofApp/build/cotire/ofApp_CXX_prefix.cxx:5,
from /home/rlj/git/ofNode/ofApp/build/cotire/ofApp_CXX_prefix.hxx:4:
/home/rlj/git/ofNode/of/src/openframeworks/math/ofVec4f.h:706:16: note: candidate: ofVec4f operator*(float, const ofVec4f&)
inline ofVec4f operator*( float f, const ofVec4f& vec ) {
Any hints for what I might need to edit in either my cmake or in the ofxImGui addon to make this work?
I'm using the 0.10 branch, by the way, but also had ofxImGui related problems in the master branch, which is why I switched.
hi, could you post here which version of ofxImGui you're trying to use ? (git url & sha for example)
I never tried to use this addon but usually I clone the addon inside the ofApp folder and just add an ofxaddon(ofxImGui)
line to the CMakeLists.txt.
Then I usually have to tweak the addon configuration file to be parsed correctly by CMake.
I tried to make ofnode smart enough to parse it but openFrameworks uses strange variable names sometimes that lure CMake and make it fails.
Hi @avilleret , thanks for your response. I'm using the master branch of this repo:
i.e. just git clone https://github.com/jvcleave/ofxImGui.git
Any pointers would be greatly appreciated...I've been trying to get this to run for way too long :)
I'm not sure if it's something with parsing the addon configuration file, as this one is basically empty:
addon_config.mk
Cheers!
Ok, so I was generally putting it in the wrong place :) Putting the addon directly in the ofApp folder seems to do the trick, and I'm able to make an older release of ofxImGui for 0.9.0 with the master branch of ofNode/of
Building for 0.1 with the newest release of ofxImGui also seems to get farther than before this way, but still fails...but this time with:
/home/rlj/git/ofNode/of/lib-linux/release-x86_64-64/libopenFrameworks.so: undefined reference to `ofSoundBuffer::operator[](unsigned long)'
collect2: error: ld returned 1 exit status
CMakeFiles/ofApp.dir/build.make:503: recipe for target '../bin/ofApp' failed
make[2]: *** [../bin/ofApp] Error 1
Which I suspect has more to do with my setting DOF_AUDIO=OFF
in my cmake settings when building ofNode/of, because otherwise I can't get it to build.
When building the 0.10 branch, I have a few issues:
When running cmake ..
from ofNode\of\build
, I need to remove this line (which points to an empty folder) in order to get it to build.
Then, when I make, I get an error at the point of building ofTrueTypeFont.cpp
:
[ 51%] Building CXX object CMakeFiles/openFrameworks.dir/src/openframeworks/graphics/ofTrueTypeFont.cpp.o
/home/rlj/ofNode/of/src/openframeworks/graphics/ofTrueTypeFont.cpp: In lambda function:
/home/rlj/ofNode/of/src/openframeworks/graphics/ofTrueTypeFont.cpp:194:81: error: no matching function for call to ‘ofPath::quadBezierTo(glm::tvec3<float, (glm::precision)0u>&, <brace-enclosed initializer list>, <brace-enclosed initializer list>)’
charOutlines->quadBezierTo(lastP, {cp->x/64, -cp->y/64}, {to->x/64, -to->y/64});
^
In file included from /home/rlj/ofNode/of/src/openframeworks/graphics/ofTrueTypeFont.h:6:0,
from /home/rlj/ofNode/of/src/openframeworks/graphics/ofTrueTypeFont.cpp:1:
/home/rlj/ofNode/of/src/openframeworks/graphics/ofPath.h:123:7: note: candidate: void ofPath::quadBezierTo(const vec3&, const vec3&, const vec3&)
void quadBezierTo(const glm::vec3 & cp1, const glm::vec3 & cp2, const glm::vec3 & p);
^~~~~~~~~~~~
etc...
I then tried just commenting out these two offending lines (194, 199)
Which got me to the error:
[ 63%] Building CXX object CMakeFiles/openFrameworks.dir/src/rtaudio/RtAudio.cpp.o
make[2]: *** No rule to make target '../src/fmodex/lib/linux64/libfmodex.so', needed by '../lib-linux/release-x86_64-64/libopenFrameworks.so'. Stop.
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/openFrameworks.dir/all' failed
make[1]: *** [CMakeFiles/openFrameworks.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Where setting cmake -DOF_AUDIO=OFF
was my workaround...which has I guess lead me to more problems!
OK, I think I got it going. Keeping OF_AUDIO=ON
, I found the fmodex/lib folder in my openframeworks folder and copied it into of/src/fmodex/lib/linux64/libfmodex.so
. From there I could build ofNode/of.
Then I just put ofxImGui in the ofApp folder, and modified cmakelists to contain:
include_directories(
${OF_ROOT}/../ofApp/ofxImGui/libs/imgui/src
)
ofxaddon(ofxImGui)