problems with ogg/vorbis frameworks

johnMG
Unregistered
 
Post: #1
I'm trying to build a small game with Xcode. I have very little experience with this IDE, but I think I've added the necessary frameworks to the stock SDL OpenGL application starter template/stationery. (A friend of mine wrote nearly all the source. I've got the app building with a makefile and using some dylibs instead of frameworks, but we're trying to get it to use only frameworks and Xcode so we can most easily get a nice double-clickable .app bundle.)

This game makes use of SDL, OpenGL, OpenAL, Python, Ogg, and Vorbis.

I downloaded the SDL and OpenAL frameworks from the usual places, but I didn't know where to find the Ogg and Vorbis frameworks, so I'm temporarily testing with some that I lifted from another game's .app/Contents/Frameworks directory.

Can someone tell me where I can find some official stock Ogg and Vorbis Mac OS X frameworks?

Also, here's the compile errors I'm getting:

vorbisfile.h:41: error: parse error before `,' token
vorbisfile.h:41: error: type specifier omitted for parameter `ogg_int64_t'
vorbisfile.h:55: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
vorbisfile.h:56: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
vorbisfile.h:62: error: syntax error before `*' token
vorbisfile.h:63: error: syntax error before `*' token
vorbisfile.h:65: error: syntax error before `*' token
vorbisfile.h:72: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
vorbisfile.h:105: error: syntax error before `(' token
vorbisfile.h:106: error: syntax error before `(' token
vorbisfile.h:109: error: type specifier omitted for parameter `ogg_int64_t'
vorbisfile.h:109: error: parse error before `)' token
vorbisfile.h:110: error: type specifier omitted for parameter `ogg_int64_t'
vorbisfile.h:110: error: parse error before `)' token
vorbisfile.h:111: error: type specifier omitted for parameter `ogg_int64_t'
vorbisfile.h:111: error: parse error before `)' token
vorbisfile.h:115: error: syntax error before `(' token
vorbisfile.h:116: error: syntax error before `(' token
ogg.h:24: os_types.h: No such file or directory
ogg.h:55: error: syntax error before `*' token
ogg.h:72: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
ogg.h:77: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
ogg.h:90: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
ogg.h:92: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
ogg.h:184: error: syntax error before `(' token
gr_ogg.h:51: declaration does not declare anything
codec.h:26: ogg.h: No such file or directory
codec.h:77: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:78: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:80: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:81: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:82: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:83: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:100: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:101: error: 'ogg_int64_t' is used as a type, but is not defined as a type.
codec.h:180: error: parse error before `)' token
codec.h:180: error: type specifier omitted for parameter `ogg_int64_t'
al_audio.cpp:126: unused variable `ALboolean loop'


Do these errors ring a bell with anyone?

Thanks.
Quote this message in a reply
johnMG
Unregistered
 
Post: #2
BTW, I'd use the ogg/vorbis dylibs and headers that I already have (installed via fink), but I haven't yet been able to successfully add them to the project.

Also, of course, once we can get the app to build, the next step is to get Xcode to make all the frameworks get baked right into the .app -- I'm supposing this will be easier if we're exclusively using frameworks, rather than adding loose dylibs into the mix.
Quote this message in a reply
Moderator
Posts: 702
Joined: 2002.04
Post: #3
SDL_mixer already has support for .ogg playback without the need for bundling any extra frameworks (although the dl for the Mac OS X framework seems to be missing from that page; pretty easy to compile the framework from source though...)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Puzzler183
Unregistered
 
Post: #4
You do need to bundle a DLL (in Windows) though so I'm guessing you'd at least have to bundle a shared object of some sort.
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #5
I've always just linked to the static libs available on xiph.org. Any particular reason you want a framework or a dylib instead?

- Alex Diener
Quote this message in a reply
johnMG
Unregistered
 
Post: #6
Thanks for the replies.

I've always just linked to the static libs available on xiph.org. Any particular reason you want a framework or a dylib instead?

I'm very new to Xcode. The only reasons for using the framework were:

1. It's easy to add a framework to the build (I haven't yet figured out how to tell Xcode where to look for regular old header files), and

2. At the time, I'd assumed that the libs (libogg, libvorbis, libvorbisfile) were LGPL (I now see that all three are BSD-licensed).

Interestingly, it turns out that my buddy got his build working without my help (he's an experienced MS Windows dev), so my post here seems to have been made unnecessary (for my purposes anyway). I believe his solution involved building the Ogg and Vorbis frameworks from source and also changing something in his app called "install name" using some install_name_tool Apple program (which was required so the SDL and OpenAL frameworks could be placed right into the .app).

Regarding the build errors as shown above, I think he had to add this to his source file file that used ogg:

Code:
#ifdef __APPLE__
#ifndef __MACOSX__
#define __MACOSX__
#endif
#endif

Thanks again.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenAL, Ogg/Vorbis music, and EXC_BAD_ACCESS 0ctane 10 7,604 May 28, 2006 01:43 PM
Last Post: OneSadCookie
  Include frameworks in my .app mrknark 4 3,247 Mar 31, 2006 10:53 PM
Last Post: OneSadCookie
  Frameworks which call SDL et al sealfin 6 3,929 Dec 31, 2003 05:42 PM
Last Post: Steven