Adding collada to project in xcode (Mac)

Hi all,

Now that I have Collada built ok, I have tried to add it to my project.
The framework has installed itself to /Library/Frameworks/Collada14Dom.framework
There are two folders (Headers and Resources) which are just Aliases (shortcuts) to the build folder.

This is what I have done (as per Wiki)

  1. Add new framework to project and browse for /Library/Frameworks/Collada14Dom.framework
  2. Add /Library/Frameworks/Collada14Dom.framework/Headers to the ‘Header search paths’ of the project
  3. Add #import “dae.h” to the actual code

On building, these are a few of the errors I get:
[Immediately following the import statement]
error: new: No such file or directory
error: syntax error before ‘daeMemorySystem’
error: syntax error before ‘{’ token

Any ideas?

Regards,
Peter

hi peter,

looks like you’ve added the import statement to a *.m (ObjectiveC) file. Try renaming your file to *.mm (aka ObjectiveC++). This will enable the compiler to find the right C++ standard lib files (e.g. <new>) and allow your ObjectiveC code to be mixed with C++. The DOM is a C++ lib, pure ObjectiveC would only understand C.

greets,

h

Thanks Heinzi, I had a feeling it had to be something simple I was overlooking.

I’ll give this a go over the weekend. My staff have the macs tied up during the week and I don’t have much opportunity to use them until then!