Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including the NOVOCAINE into projects #17

Closed
Baskaran opened this issue Jun 24, 2012 · 10 comments
Closed

Including the NOVOCAINE into projects #17

Baskaran opened this issue Jun 24, 2012 · 10 comments

Comments

@Baskaran
Copy link

I have difficulty when I include the novocaine into my project. I get the Unknown type name 'class' error. If i have Novocaine as a project as downloaded from the Github - I am able to get it running. Any help?

@coryalder
Copy link
Contributor

I think the solution to this is to

a) only include the C++ headers (RingBuffer.h, AudioFileWriter.h, AudioFileReader.h) from within .mm files. This means not from the .h files associated with your .mm files.

or b) set the compiler to default to Objective-C++. Go to your project's build settings, and find "Compile Sources As". It's probably set to "According to file type", change to it "Objective-C++".

Setting the compiler to default to Objective-C++

@alexbw
Copy link
Owner

alexbw commented Jul 4, 2012

Baskaran, did you ever get this working, or did coryalder's tip help?

@ghost
Copy link

ghost commented Aug 16, 2012

Hi, just started with Novocaine and had the class error all over, the only thing you will have to do to make this disappear is to rename all source files which include any of Novocaines headers directly or indirectly to the file ending .mm.

This will help. You still need to rename those files if you do not include RingBuffer, because AudioFileReader includes RingBuffer.h.

Hope this helps
best sn-e5

@ghost
Copy link

ghost commented Aug 20, 2012

i suppose, alexbw, you might close this issue. see the above comments.

best

@casbreuk
Copy link
Contributor

Also need to include AudioToolbox framework and CoreAudio framework on iOS.

@GilesHammond
Copy link

You'll also need to mark all the Novocaine files "-fno-objc-arc" in Build Phases-Compile Sources if you are using Novocaine in an ARC enabled project.

@pablobrady
Copy link

Sadly, still seeing linker issues... (new project / iOS 6.1 / non-arc / non-storyboard)

-- I also needed to REMOVE the framework "AudioUnit.h" (as discovered in this post #16 ).

-- And I changed the OutputBlock and InputBlock in Novocaine.h from "retain" to "copy" (as suggested elsewhere). This quiets the 2 warnings.

But the issues still persist...
"Undefined symbols for architecture armv7" - class Novocaine, referenced from ViewController.o (a new project, but I've tried to copy straight from the code and settings from the Novocaine sample project.

I'm kindof at a loss. Is this an iOS 6.x issue?

@ndonald2
Copy link
Collaborator

@PeddlePower Try going to Project Settings -> Targets -> YourAppName -> Build Phases -> Compile Sources and make sure that Novocaine.m is listed there. It sounds like maybe you added the files to the project but not to your build target.

Another way to check is to select the Novocaine.m file in the project navigator, go to the inspector (far right panel in XCode) and make sure that your build target is checked off under "Target Membership"

@pablobrady
Copy link

@ndonald2 OMG. You're right. Thank you!

That was the last little bit to get it running.

P.S. I must have been suffering from "compiler-fatigue".

@alexbw
Copy link
Owner

alexbw commented May 23, 2013

Seems resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants