With that bit of code in place I get this error...
1 2 3 4
In file included from /home/pi/Cinder/samples/CollidoscopeApp/src/CollidoscopeApp.cpp:31:0:
/home/pi/Cinder/samples/CollidoscopeApp/include/Wave.h:58:16: error: usingtypedef-name ‘Cursor’ after ‘struct’
typedefstruct Cursor {
^
If I comment out the struct call I get...
1 2 3
error: request for member ‘pos’ in ‘cursor’, which is of non-class type ‘Cursor {aka longunsignedint}’
cursor.pos = pos;
^
So it needs something there, but that struct call conflicts with X11 .
I changed so many things...I must have pasted the wrong error...
1 2 3 4
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;
^
I tried renaming Cursor and got these errors...
1 2 3 4 5 6 7
/home/pi/Cinder/samples/CollidoscopeApp/src/Wave.cpp: In member function ‘void Wave::update(double, const DrawInfo&)’:
/home/pi/Cinder/samples/CollidoscopeApp/src/Wave.cpp:79:38: error: conversion from ‘std::map<int, CCursor>::iterator {aka std::_Rb_tree_iterator<std::pair<constint, CCursor> >}’ to non-scalar type ‘MapItr {aka std::_Rb_tree_iterator<std::pair<constint, longunsignedint> >}’ requested
for (MapItr itr = mCursors.begin(); itr != mCursors.end(); ++itr){
^
/home/pi/Cinder/samples/CollidoscopeApp/src/Wave.cpp:79:45: error: no match for ‘operator!=’ (operand types are ‘MapItr {aka std::_Rb_tree_iterator<std::pair<constint, longunsignedint> >}’ and ‘std::map<int, CCursor>::iterator {aka std::_Rb_tree_iterator<std::pair<constint, CCursor> >}’)
for (MapItr itr = mCursors.begin(); itr != mCursors.end(); ++itr){
^
(and another 1000 lines of errors)
So I wasn't sure if it was a wrong use of the X11 Cursor, or if they were trying to define a new item...I couldn't tell if I was making things worse.
I mentioned that I had renamed the 'Cursor' in the Wave.h file...however I failed to also rename 'Cursor' in the Wave.cpp file...that created the 1000 lines of errors.
Once I renamed Cursor in both files it compiled without error.
So thanks for the help!
...it is hard to enter someone else's code and fix...