launch openFrameworks app from cocoa GUI

I want to do a very simple cocoa GUI window with credits and a button. as soon as you press the button I want my openFrameworks app to launch immediately

I am having difficulties adding my code and openFrameworks into a cocoa project - firtsly, I get all sorts of errors that indicate missing headers allthough I have make sure the search paths point at the right place - I am obviously missing sth crucial here…

anyway,

I have created my window with interface builder - what’ s the easiest way to proceed ??
as I am a bit out of my waters with objC I am thinking of just creating 2 applications. One in cocoa/obj that would call the other as soon as the button is pressed

you should be able to use system() from Objective-C to launch your OF app.

  
  
- (void)onButtonPress:(id)sender  
{  
	const char * systemCommand = "open /Applications/Utilities/Grab.app &";  
	system(systemCommand);  
}  
  

it works - thx

Any parallel for this on iOS? I’m trying to do the same thing, i.e. “welcome screen” and GUI from iPhone and then a click launches my testApp.

At the moment I get linker errors like:

  
Undefined symbols for architecture i386:  
  "ofSetColor(ofColor_<unsigned char> const&)", referenced from:  
      testApp::drawScore()     in testApp.o  

For basically every function in openFrameworks.

Any idea what’s going on here?

"Undefined symbols for architecture i386: " means you’re not compiling against ARM7. How do you have your project set up?

note that there is a problem with this approach:

The path is not relative and thus the program will not work if transfered to some other folder - the app I want to run should be located in some resources folder relative to the cocoa app

no idea of how to fix this in objC

I am still having problem with this…

  
@implementation button  
- (IBAction)doSomething:(id)pId;  
{  
	  
	SInt32 major, minor;  
	Gestalt(gestaltSystemVersionMajor, &major);  
	Gestalt(gestaltSystemVersionMinor, &minor);  
	  
	NSFileManager *filemgr;  
	NSString *currentpath;  
	NSString *appPath;  
	  
	filemgr = [[NSFileManager alloc] init];  
	currentpath = [filemgr currentDirectoryPath];  
	  
	if (major==10 && minor<=4) {  
		appPath=[currentpath stringByAppendingString:@"/resources/systemRun4.app"];  
		[[NSWorkspace sharedWorkspace] launchApplication:appPath];  
	} else if (major==10 && minor==5) {  
		appPath=[currentpath stringByAppendingString:@"/resources/systemRun5.app"];  
		[[NSWorkspace sharedWorkspace] launchApplication:appPath];  
	} else if (major==10 && minor>=6) {  
		appPath=[currentpath stringByAppendingString:@"/resources/systemRun6.app"];  
		[[NSWorkspace sharedWorkspace] launchApplication:appPath];    
	} else {  
		appPath=[currentpath stringByAppendingString:@"/resources/systemRun6.app"];  
		[[NSWorkspace sharedWorkspace] launchApplication:appPath];  
	}  
	  
	exit(0);  
}  

works ok when I build&run from xcode but not when I launch the app from the finder (even if I do it from the actual build folder)

wtf ???