iPhone Open Application Development
iPhone Open Application Development Write Native Objective-C Applications for the iPhone

By Jonathan A. Zdziarski
Book Price: $39.99 USD
£24.99 GBP
PDF Price: $27.99

Cover | Table of Contents | Forum | Colophon


Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Camera Example Fails To Link: Missing Applejpeg Framework
ijt
post Apr 27 2008, 08:30 AM
Post #1


New Member
*

Group: Members
Posts: 2
Joined: 27-April 08
Member No.: 258



Hi, thanks for writing this wonderful book.

The camera example in appendix 3 doesn't link for me:

~/iphone/examples/Code Examples/A.3 Camera Controller
$ arm-apple-darwin-gcc -o snap snap.m -lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework PhotoLibrary
/usr/local/bin/arm-apple-darwin-ld: warning unknown -macosx_version_min parameter value: 10.5.2 ignored (using 10.1)
/usr/local/bin/arm-apple-darwin-ld: warning can't open dynamic library: /usr/local/share/iphone-filesystem/System/Library/PrivateFrameworks/AppleJPEG.framework/AppleJPEG referenced from: /usr/local/share/iphone-filesystem/System/Library/Frameworks/PhotoLibrary.framework/PhotoLibrary (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/local/bin/arm-apple-darwin-ld: Undefined symbols:
_JPEGCreateCGImageRefFromCFData referenced from PhotoLibrary expected to be defined in /System/Library/PrivateFrameworks/AppleJPEG.framework/AppleJPEG
collect2: ld returned 1 exit status


I also tried copying the AppleJPEG framework from the official SDK and then adding -framework AppleJPEG:

arm-apple-darwin-gcc -o snap snap.m -lobjc -framework CoreFoundation -framework Foundation -framework UIKit -framework AppleJPEG -framework PhotoLibrary
/usr/local/bin/arm-apple-darwin-ld: warning unknown -macosx_version_min parameter value: 10.5.2 ignored (using 10.1)
/usr/local/bin/arm-apple-darwin-ld: /usr/local/share/iphone-filesystem/System/Library/Frameworks/AppleJPEG.framework/AppleJPEG load command 14 unknown cmd field
/usr/local/bin/arm-apple-darwin-ld: warning can't open dynamic library: /usr/local/share/iphone-filesystem/System/Library/PrivateFrameworks/AppleJPEG.framework/AppleJPEG referenced from: /usr/local/share/iphone-filesystem/System/Library/Frameworks/PhotoLibrary.framework/PhotoLibrary (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
collect2: ld returned 1 exit status

I guess I should try compiling the example with the official SDK, but I don't know if it will run on my phone then.

Go to the top of the page
 
+Quote Post
jzdziarski
post Apr 27 2008, 04:30 PM
Post #2


Active Member
**

Group: Members
Posts: 24
Joined: 1-April 08
Member No.: 187



The AppleJPEG framework can be copied over from the iPhone's private frameworks, and you can build with -F/path/to/PrivateFrameworks on your desktop machine. I don't believe you need this linkage unless you are building for 2.0 - and being that 2.0 is still in beta and very volatile, I wouldn't try to make any changes to accommodate it yet.

Go to the top of the page
 
+Quote Post
ijt
post Apr 27 2008, 10:35 PM
Post #3


New Member
*

Group: Members
Posts: 2
Joined: 27-April 08
Member No.: 258



That solved it. Thanks for the solution.

QUOTE (jzdziarski @ Apr 27 2008, 04:30 PM) *
The AppleJPEG framework can be copied over from the iPhone's private frameworks, and you can build with -F/path/to/PrivateFrameworks on your desktop machine. I don't believe you need this linkage unless you are building for 2.0 - and being that 2.0 is still in beta and very volatile, I wouldn't try to make any changes to accommodate it yet.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 16th May 2008 - 12:45 PM