Cocoa, RegexKit Framework ld error in 10.4.11 tiger.
RegexKit Framework를 문서에 나온 데로 프로젝트에 추가했는데
컴파일에서 다음과 같은 에러가 발생하면, RegexKit Framework Source를 받아서 Compile해서 추가하면 에러가 발생하지 않는다.
컴파일에서 다음과 같은 에러가 발생하면, RegexKit Framework Source를 받아서 Compile해서 추가하면 에러가 발생하지 않는다.
collect2: ld returned 1 exit status
cd /Users/x/Documents/trunk/NateOn
/Developer/usr/bin/g++-4.0 -o /Users/x/Documents/trunk/NateOn/build/NateOn.build/Debug/NateOn.build/Objects-normal/ppc/NateOn -arch ppc /Developer/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/Resources/libZeroLinkAppStub.a -Wl,-all_load -L/Users/x/Documents/trunk/NateOn/build/Debug -L/Users/x/Documents/trunk/NateOn -L/Users/x/Documents/trunk/NateOn -L/Users/x/Documents/trunk/NateOn -L/Users/x/Documents/trunk/NateOn -L/Users/x/Documents/trunk/NateOn -L/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn/build/Debug -F/Users/x/Documents/trunk/NateOn/.. -F/Users/x/Documents/trunk/NateOn/.. -F/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn/Frameworks -F/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn -F/Users/x/Documents/trunk/NateOn -F/Developer/Local/Frameworks -F/Developer/Local/Frameworks -framework Growl -framework Cocoa -framework WebKit -lcrypto -framework Carbon -framework SystemConfiguration -framework IOKit -framework RegexKit -Wl,-Y,1455 -framework ZeroLink -F/Developer/Library/PrivateFrameworks -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -Wl,-x -Wl,-unexported_symbols_list -Wl,/Developer/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/Resources/ZeroLinkAppStub.nexp -Wl,-sectcreate -Wl,__TEXT -Wl,__zerolink -Wl,/Users/x/Documents/trunk/NateOn/build/NateOn.build/Debug/NateOn.build/Objects-normal/ppc/NateOn.zerolink
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning -F: directory name (/Users/x/Documents/trunk/NateOn/Frameworks) does not exist
/Developer/usr/bin/../libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: /Developer/Local/Frameworks/RegexKit.framework/RegexKit unknown flags (type) of section 6 (__TEXT,__dof_RegexKit) in load command 0
collect2: ld returned 1 exit status
주의사항
- RegexKit Framework 컴파일은 README.MacOSX를 보고 Terminal에서 컴파일 한다. 소스안의 RegexKit.xcodeproj를 XCode로 컴파일하니 Warnning이 발생했다.
- 개인적으로 MacPort를 사용하고 있어서 Termial에서 compile이 아마 XCode에서의 컴파일과 다르지 않을까? 하는 생각을 한다.
RegexKit 홈페이지 : http://regexkit.sourceforge.net/
dyld: Library not loaded… Reason: image not found
NateOn has exited due to signal 5 (SIGTRAP).
[Session started at 2008-07-08 15:53:39 +0900.]
dyld: Library not loaded: @executable_path/../Frameworks/Growl.framework/Versions/A/Growl
Referenced from: /Users/x/Documents/trunk/NateOn/build/Release/NateOn.app/Contents/MacOS/NateOn
Reason: image not found
좀 어이없는 설정으로 Framework link error에서 헤맨 것 같다.
결론적으로는 아래 그림에서 보이는 “Copy only when installing” 옵션이 켜져 있어서 에러가 발생했었다.
이게 켜져있으면 NateOn.app 디렉토리안에 Frameworks 의 자료들이 Copy가 되지 않는다.
개인적으로 판단하기에는 이 옵션이 기본인지 모르겠지만 컴파일 시간을 조금이라도 줄여보고자 체크가 되있었던것 같다.
Growl과 같이 Dynamic Library를 사용하는 Framework은 이 옵션을 꺼야한다.





leave a comment