ofSoundPlayer Causes Strange Errors

I have a perfectly working project that uses HaarFinder, plays video, etc.

When I simply add ofSoundPlayer to my TestApp.h, it causes 6 strange errors that I have not seen before.
When I remove ofSoundPlayer, the errors remain! Even if I undo placing ofSoundPlayer, the errors remain. And if I close and re-open the program, they are still there.

Does anyone have a suggestion for where these errors came from, how to get rid of them, and what I can do to make ofSoundPlayer work without these errors?

Here are the errors:

error: /Library/Caches/com.apple.Xcode.1850445473/SharedPrecompiledHeaders/Carbon-fdciyqfbjwythxgiskibjwumrjfp/Carbon.h: No such file or directory
error: one or more PCH files were found, but they were invalid
error: use -Winvalid-pch for more information

cc1plus: error: /Library/Caches/com.apple.Xcode.1850445473/SharedPrecompiledHeaders/Carbon-fdciyqfbjwythxgiskibjwumrjfp/Carbon.h: No such file or directory
cc1plus: error: one or more PCH files were found, but they were invalid
cc1plus: error: use -Winvalid-pch for more information
Build failed (6 errors)

Here is the TestApp.h file where I placed ofSoundPlayer:

#ifndef _TEST_APP  
#define _TEST_APP  
#include "ofMain.h"  
#include "ofxOpenCv.h"  
//this is not part of the addon yet  
//so include it seperately  
#include "ofxCvHaarFinder.h"  
class testApp : public ofBaseApp{  
	void setup();  
	void update();  
	void draw();  
	void keyPressed(int key);  
	ofImage background;  
	ofImage mask;  
	ofImage masked;  
	ofVideoGrabber webcam;  
	ofVideoGrabber vidGrabber;  
	ofVideoPlayer  boarMovie;	  
	ofxCvColorImage			colorImg;	  
	ofxCvGrayscaleImage 	grayImage;	  
	ofxCvHaarFinder			haarFinder;  
	bool  	bFullscreen;  
	//ofSoundPlayer speech;  


Somehow you’re not linking to those frameworks properly, which I’m guessing is a sign of a corrupted project file. You might be able to “clean all” and fix it since it’s coming from a cache of some sort (if you haven’t tried that already). It looks like you’re on OF0062 so can you either try recreating your project or perhaps post the zipped source somewhere and link to it and I can sort out what’s going on with it.

Thank you for the timely advice, joshuajnoble!

Doing a “clean all” was successful. I just opened my program, then went to the Build Menu > Clean and it worked again.

I was also able to add my sound using ofSoundPlayer like so:

in TestApp.h:

ofSoundPlayer speech;  

in TestApp.cpp setup


This forum is a life saver (or at least a project/sanity saver). Thanks oF!