I can usually follow directions and make things work…but I am stumped.
I am compiling an app for the Raspberry Pi (raspian linux). The app comes with all the source code and libraries needed.
I followed the directions and compiled Cinder without any errors.
My problem is the app build file has a command (these files are placed in the Cinder samples area);
Inside a file named cibuild, is one command
…/…/…/tools/linux/cibuilder -app “$@”
I assume it is looking in the Cinder/tools/linux directory for a file named cibuilder…or perhaps there is supposed to be a directory named cibuilder. In any case, there is not…and nothing remotely resembling it.
This app was written in 2016 and apparently Cinder made a big change in 2016…
So can someone direct me to some knowledge on how to change this so it correctly compiles? (there is a CMakeLists.txt file in the same directory)
It seems like CMake should be the command, but I don’t know how to make the conversion.
There is an include directory, a src directory, and a directory named linux which contains the cibuild file and the CMakeLists.txt file.
The following is untested, copy pasted from your link and edited here so it might contain errors but this is how your application’s CMakeLists.txt should more or less look like:
Thanks, I spent hours looking at the Cinder samples and trying to make mine look like that…you version at least worked…BTW, thanks for the link to the best practices.
I don’t expect you to fix all the code, can you just tell me if the first errors caused the compile “recipe” to fail…or something else.
Thanks again
from /home/pi/Cinder/samples/CollidoscopeApp/src/CollidoscopeApp.cpp:24:
/usr/include/X11/X.h:103:13: note: ‘Cursor’ has a previous declaration here
typedef XID Cursor;
^
In file included from /home/pi/Cinder/samples/CollidoscopeApp/src/CollidoscopeApp.cpp:31:0:
/home/pi/Cinder/samples/CollidoscopeApp/include/Wave.h: In member function ‘void Wave::setCursorPos(SynthID, int, const DrawInfo&)’:
/home/pi/Cinder/samples/CollidoscopeApp/include/Wave.h:182:16: error: request for member ‘pos’ in ‘cursor’, which is of non-class type ‘Cursor {aka long unsigned int}’
cursor.pos = pos;
^
/home/pi/Cinder/samples/CollidoscopeApp/include/Wave.h:183:16: error: request for member ‘lastUpdate’ in ‘cursor’, which is of non-class type ‘Cursor {aka long unsigned int}’
cursor.lastUpdate = ci::app::getElapsedSeconds();
^
CMakeFiles/CollidoscopeApp.dir/build.make:62: recipe for target ‘CMakeFiles/CollidoscopeApp.dir/home/pi/Cinder/samples/CollidoscopeApp/src/CollidoscopeApp.cpp.o’ failed
make[2]: *** [CMakeFiles/CollidoscopeApp.dir/home/pi/Cinder/samples/CollidoscopeApp/src/CollidoscopeApp.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target ‘CMakeFiles/CollidoscopeApp.dir/all’ failed
make[1]: *** [CMakeFiles/CollidoscopeApp.dir/all] Error 2
Makefile:83: recipe for target ‘all’ failed
make: *** [all] Error 2
Not sure that is the correct path to go…Obviously it created more errors down the road.
I guess I don’t understand the initial implementation…surely X11 has changed that much over the years…
These are the offending calls in the Wave.h file…
/**
A Cursor is the white thingy that loops through the selection when Collidoscope is played.
*/
struct Cursor {
static const int kNoPosition = -100;
int pos;
double lastUpdate;
};
and
/* Maps id of the synth to cursor. There is one cursor for each Synth being played */
std::map < SynthID, Cursor > mCursors;
/** Holds the positions of the cursor, namely on which chunk the cursor is currently on */
std::vector<int> mCursorsPos;
finally
/** Places the cursor on the wave. Every cursor is associated to a synth voice of the audio engine.
* The synth id identifies uniquely the cursor in the internal map of the wave.
* If the cursor doesn’t exist it is created */
inline void setCursorPos( SynthID id, int pos, const DrawInfo& di ){
I don’t understand if the author was using the X11 cursor, or defining his own…if defining his own, then I can ‘simply’ rename it everywhere…but I don’t know if that would break some other functionality…btw, it is alot of edits…so I am going to attempt it with some duplicate files and see if that works…