• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Scripting Bridge link error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scripting Bridge link error


  • Subject: Scripting Bridge link error
  • From: Randall Meadows <email@hidden>
  • Date: Wed, 9 Sep 2009 19:52:41 -0600

I am trying to use Scripting Bridge to do some minor control of Adobe Photoshop CS3 from my Cocoa app. I have followed the instructions in the "Scripting Bridge Programming Guide for Cocoa", specifically:

1. Generate header files for all scriptable applications that your code is sending messages to: I used "sdef /Users/Shared/Adobe\ Photoshop\ CS3/Adobe\ Photoshop\ CS3.app | sdp -fh --basename AdobePhotoshopCS3" to generate this header.
2. Add these files to your project. (done)
3. In your header or implementation files, add #import statements for the generated header files. (done)
4. Add the Scripting Bridge framework to your project. (done)


Here is the modest amount of code I'm using right now:

AdobePhotoshopCS3Application *psApp = [SBApplication applicationWithBundleIdentifier:@"com.adobe.Photoshop"];
if ([psApp isRunning]) {
SBElementArray *docs = [psApp documents];
NSUInteger index ;
AdobePhotoshopCS3Document *doc;
AdobePhotoshopCS3JPEGSaveOptions *options = [AdobePhotoshopCS3JPEGSaveOptions new];
options.quality = 12;
for (index = 0; index < [docs count]; index++) {
doc = [[docs objectAtIndex:index] get];
[doc saveIn:doc.filePath
as:AdobePhotoshopCS3SvFmJPEG
copying:NO
appending:AdobePhotoshopCS3E300NoExtension
withOptions:options];
}
[options release];
}


It compiles fine, but I get this link error:
Undefined symbols:
".objc_class_name_AdobePhotoshopCS3JPEGSaveOptions", referenced from:
literal- pointer@__OBJC@__cls_refs@AdobePhotoshopCS3JPEGSaveOptions in AMBatchEditMonitor.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


It's in the header file that got generated

@interface AdobePhotoshopCS3JPEGSaveOptions : AdobePhotoshopCS3SaveOptions
@property BOOL embedColorProfile; // embed color profile in document
@property AdobePhotoshopCS3E270 formatOptions; // ( default: standard )
@property AdobePhotoshopCS3E880 matte;
@property NSInteger quality; // quality of produced image ( 0 - 12; default: 3 )
@property NSInteger scans; // number of scans. Only valid for progressive type JPEG files ( 3 - 5 )
@end


but where's the object code for it? The other classes used (AdobePhotoshopCS3Application and AdobePhotoshopCS3Document) are apparently linked OK, so what gives with the JPEGSaveOptions?


Thanks! randy

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Scripting Bridge link error
      • From: Jason Foreman <email@hidden>
  • Prev by Date: [MEET]: LA CocoaHeads tomorrow night, 9/10 7:30pm
  • Next by Date: Framing a UIImageView
  • Previous by thread: [MEET]: LA CocoaHeads tomorrow night, 9/10 7:30pm
  • Next by thread: Re: Scripting Bridge link error
  • Index(es):
    • Date
    • Thread