我正在尝试使用 cmake 将程序与 OS X 上的 ogre 和其他一些库链接,但我不断收到此错误:
ld: warning: directory '/Library/Frameworks/SDL.framework/Debug' following -L not found
ld: warning: directory '-framework Cocoa/Debug' following -L not found
ld: warning: directory '-framework Cocoa' following -L not found
ld: warning: directory '/System/Library/Frameworks/OpenAL.framework/Debug' following -L not found
ld: warning: directory '/Library/Frameworks/Ogre.framework/Debug' following -L not found
ld: warning: directory '/opt/local/lib/libogg.dylib/Debug' following -L not found
ld: warning: path '/opt/local/lib/libogg.dylib' following -L not a directory
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/ogre/Debug' following -L not found
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/ogre' following -L not found
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/openal/Debug' following -L not found
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/openal' following -L not found
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/oggvorbis/Debug' following -L not found
ld: warning: directory '/Users/hydrowolfy/Documents/newphysgame/physgame/physgameengine/data/macosx/oggvorbis' following -L not found
ld: library not found for -lOgreMain
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.2 failed with exit code 1
相同的 cmake 文件适用于 Windows 和 Linux。我正在尝试链接我从 ogre 网站上的 SDK 获得的 ogre 1.7.2 框架。我认为这是一个链接问题,而不是一个食人魔问题。使用 cmake 链接框架并不像我希望的那样直观。有想法该怎么解决这个吗?