Question

I've been working on this https://github.com/Morpheu5/SecondStudy-touch until the moment when Xcode decided to go bananas and stop compiling because of... well, I have no idea. It seems to me that this must be the result of some rookie mistake but I really can't see it.

The error it spits out is precisely

In file included from /Users/af6539/src/SecondStudy/xcode/../src/TouchPoint.cpp:1:
In file included from /Users/af6539/src/SecondStudy/xcode/../include/TouchPoint.h:4:
/Users/af6539/src/SecondStudy/xcode/../../cinder_0.8.5_mac/blocks/TUIO/include/TuioCursor.h:51:44: error: use of undeclared identifier 'osc'
    static Cursor createFromSetMessage( const osc::Message &message ) {
                                              ^
/Users/af6539/src/SecondStudy/xcode/../../cinder_0.8.5_mac/blocks/TUIO/include/TuioCursor.h:87:47: error: use of undeclared identifier 'osc'
    static Cursor25d createFromSetMessage( const osc::Message &message ) {
                                                 ^

which refers to the library I'm using, cinder, which includes TUIO and OSC. As I said, It was working, then I think everything started to go south when I began working on the whole MusicStroke* business, so those files may give some clues? If they do, I can't see them.

Was it helpful?

Solution

The first suggestion I'd make is to roll back to a previous commit until you can successfully build. I'd also delete the build directory (or whatever the shared folder is if you're not using a relative 'Derived Data' path), as one possible explanation of what you saw is that a cached version of your compiled code was not showing the error, but then all of the sudden it was invalidated.

If I had to guess, without any sample code and only briefly skimming over your project, I would indeed say it is because a cyclical include. Try to forward declare what you can and #include from the .cpp. For example, TouchTrace in MusicStrokeGesture.h can be forward declared...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top