Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Link error when working with XCode

18 views
Skip to first unread message

thomas

unread,
Oct 6, 2011, 5:46:03 AM10/6/11
to
Hi,

When linking ReCast, an open-source project, I got the following
errors.

-----error msg----
Ld RecastDemo/Bin/Debug/RecastDemo.app/Contents/MacOS/RecastDemo
normal x86_64
cd /Users/mingzhang/Root/Project/ReCast/recastnavigation-read-only
setenv MACOSX_DEPLOYMENT_TARGET 10.6
/Developer/usr/bin/g++-4.2 -arch x86_64 -L/Users/mingzhang/Root/
Project/ReCast/recastnavigation-read-only/RecastDemo/Bin/Debug -L/
Users/mingzhang/Root/Project/ReCast/recastnavigation-read-only/
RecastDemo/Contrib/SDL/SDL.framework/Versions/A/Debug -L/Users/
mingzhang/Root/Project/ReCast/recastnavigation-read-only/RecastDemo/
Contrib/SDL/SDL.framework/Versions/A -F/Users/mingzhang/Root/Project/
ReCast/recastnavigation-read-only/RecastDemo/Bin/Debug -filelist /
Users/mingzhang/Root/Project/ReCast/recastnavigation-read-only/
RecastDemo/Bin/RecastNavigation.build/Debug/RecastDemo.build/Objects-
normal/x86_64/RecastDemo.LinkFileList -mmacosx-version-min=10.6 -Wl,-
search_paths_first -headerpad_max_install_names /Users/mingzhang/Root/
Project/ReCast/recastnavigation-read-only/DebugUtils/Debug/
libDebugUtils.a /Users/mingzhang/Root/Project/ReCast/recastnavigation-
read-only/Detour/Debug/libDetour.a /Users/mingzhang/Root/Project/
ReCast/recastnavigation-read-only/DetourCrowd/Debug/libDetourCrowd.a /
Users/mingzhang/Root/Project/ReCast/recastnavigation-read-only/
DetourTileCache/Debug/libDetourTileCache.a /Users/mingzhang/Root/
Project/ReCast/recastnavigation-read-only/Recast/Debug/libRecast.a -
lSDL -framework Cocoa -framework AGL -framework OpenGL -lSDL -
framework Cocoa -framework AGL -framework OpenGL -o /Users/mingzhang/
Root/Project/ReCast/recastnavigation-read-only/RecastDemo/Bin/Debug/
RecastDemo.app/Contents/MacOS/RecastDemo

ld: warning: directory '/Users/mingzhang/Root/Project/ReCast/
recastnavigation-read-only/RecastDemo/Contrib/SDL/SDL.framework/
Versions/A/Debug' following -L not found
ld: library not found for -lSDL
collect2: ld returned 1 exit status
Command /Developer/usr/bin/g++-4.2 failed with exit code 1
-----end----

The project is configured with cmake-2.8.app.
The error says that the library "SDL" cannot be found. But I'm sure
that the SDL library locates in "-L/Users/mingzhang/Root/Project/
ReCast/recastnavigation-read-only/RecastDemo/Contrib/SDL/SDL.framework/
Versions/A ".
Why cannot it be found?

Any help is appreciated, thanks!

--tom
0 new messages