Re: How to use NSWorkspace?
You probable do not have AppKit include into you command line tool (under the 'External Frameworks and Libraries' folder) either add it to your project or look at LaunchServices which is easy to use, I have an example/wrapper on my web site. On 08/12/2008, at 11:07 , John Velman wrote: I'm missing something obvious, but I don't know what. I want to use NSWorkspace to open an application from a command line Foundation Tool. When I try to build the simplest thing, I get -- Undefined symbols: .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status --- This happens whatever combination of the following imports I use: #import Foundation/Foundation.h #import ApplicationServices/ApplicationServices.h #import cocoa/Cocoa.h #import AppKit/AppKit.h This also happens for [[NSWorkspace sharedWorkspace] openFile:@SomeFile withApplication:@someApp]; Examples I find, don't seem to have any problem, but when I copy them onto my machine, they don't work. Thanks, John V. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/nathan_day%40mac.com This email sent to [EMAIL PROTECTED] Nathan Day Software Engineer home: +61 (0)2 9356 4874 work: +61 (0)2 8207 8241 mobile: +61 (0)4 3863 2407 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to use NSWorkspace?
On 08/12/2008, at 8:59 PM, Mike Abdullah wrote: You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. I'm pretty certain he's doing the reverse. Wants to launch a proper application FROM a command-line tool. Yeah, you're right, sorry about that. Wrote it before my coffee :-) -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to use NSWorkspace?
On 8 Dec 2008, at 00:45, Rob Keniger wrote: On 08/12/2008, at 10:07 AM, John Velman wrote: I want to use NSWorkspace to open an application from a command line Foundation Tool. You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. I'm pretty certain he's doing the reverse. Wants to launch a proper application FROM a command-line tool. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
How to use NSWorkspace?
I'm missing something obvious, but I don't know what. I want to use NSWorkspace to open an application from a command line Foundation Tool. When I try to build the simplest thing, I get -- Undefined symbols: .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status --- This happens whatever combination of the following imports I use: #import Foundation/Foundation.h #import ApplicationServices/ApplicationServices.h #import cocoa/Cocoa.h #import AppKit/AppKit.h This also happens for [[NSWorkspace sharedWorkspace] openFile:@SomeFile withApplication:@someApp]; Examples I find, don't seem to have any problem, but when I copy them onto my machine, they don't work. Thanks, John V. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to use NSWorkspace?
NSWorkspace is part of AppKit, so you need to link against that, not just Foundation. Alternatively, you could drop down directly to the Launch Services functions. On 8 Dec 2008, at 00:07, John Velman wrote: I'm missing something obvious, but I don't know what. I want to use NSWorkspace to open an application from a command line Foundation Tool. When I try to build the simplest thing, I get -- Undefined symbols: .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status .objc_class_name_NSWorkspace, referenced from: [EMAIL PROTECTED]@[EMAIL PROTECTED] in LaunchMyMail.o ld: symbol(s) not found collect2: ld returned 1 exit status --- This happens whatever combination of the following imports I use: #import Foundation/Foundation.h #import ApplicationServices/ApplicationServices.h #import cocoa/Cocoa.h #import AppKit/AppKit.h This also happens for [[NSWorkspace sharedWorkspace] openFile:@SomeFile withApplication:@someApp]; Examples I find, don't seem to have any problem, but when I copy them onto my machine, they don't work. Thanks, John V. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: How to use NSWorkspace?
On 08/12/2008, at 10:07 AM, John Velman wrote: I want to use NSWorkspace to open an application from a command line Foundation Tool. You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. -- Rob Keniger ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]