1

I'm building a game on Mac OS X that uses SDL. However, SDL.framework is exhibiting peculiar behavior.

If SDL.framework exists in /Library/Frameworks as well as the application bundle, GDB spits up the following:

objc[40787]: Class SDLTranslatorResponder is implemented in both /Users/Hinchy/Library/Developer/Xcode/DerivedData/Here_Comes_Launchman-abjymmujvjzdemcsrkkcmonahuva/Build/Products/Debug/Here Comes Launchman.app/Contents/MacOS/../Frameworks/SDL.framework/Versions/A/SDL and /Library/Frameworks/SDL.framework/Versions/A/SDL. One of the two will be used. Which one is undefined. objc[40787]: Class SDL_QuartzWindow is implemented in both /Users/Hinchy/Library/Developer/Xcode/DerivedData/Here_Comes_Launchman-abjymmujvjzdemcsrkkcmonahuva/Build/Products/Debug/Here Comes Launchman.app/Contents/MacOS/../Frameworks/SDL.framework/Versions/A/SDL and /Library/Frameworks/SDL.framework/Versions/A/SDL. One of the two will be used. Which one is undefined. objc[40787]: Class SDL_QuartzWindowDelegate is implemented in both /Users/Hinchy/Library/Developer/Xcode/DerivedData/Here_Comes_Launchman-abjymmujvjzdemcsrkkcmonahuva/Build/Products/Debug/Here Comes Launchman.app/Contents/MacOS/../Frameworks/SDL.framework/Versions/A/SDL and /Library/Frameworks/SDL.framework/Versions/A/SDL. One of the two will be used. Which one is undefined. objc[40787]: Class SDL_QuartzView is implemented in both /Users/Hinchy/Library/Developer/Xcode/DerivedData/Here_Comes_Launchman-abjymmujvjzdemcsrkkcmonahuva/Build/Products/Debug/Here Comes Launchman.app/Contents/MacOS/../Frameworks/SDL.framework/Versions/A/SDL and /Library/Frameworks/SDL.framework/Versions/A/SDL. One of the two will be used. Which one is undefined.

The game then proceeds to crash with an EXC_BAD_ACCESS symbol at the first SDL_PollEvent.

If SDL.framework exists only in the application bundle (or does not exist at all), the game refuses to start at all.

If SDL.framework exists only in /Library/Frameworks, the game runs with no issues.

This only holds true for SDL.framework and not the other SDL derivatives (SDL_image, SDL_mixer, etc) I'm using in my project.

4

1 に答える 1

0

この投稿をチェックしてください: Mac App Bundle にフレームワークを埋め込む

の変更

Runpath Search Paths」のビルド設定を「@loader_path/../Frameworks」に設定

提案されたように、出力からそのメッセージを消去し、 /Library/Frameworks フォルダーにある SDL.framework なしで実行できるようにしました。

于 2012-10-25T03:52:37.317 に答える