Using Max code in XCode

Miscellaneous Forums/MacOS X Discussion/Using Max code in XCode

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I created the below test module:
Strict
Module angeldaniel.ctest
ModuleInfo "Version  : 1.00"
ModuleInfo "Author   : Paul West (AngelDaniel)"
ModuleInfo "Internet : none"
ModuleInfo "License  : Copyright (c) 2006 Paul West"

ModuleInfo "History  : 1.00 Initial test version"

Import brl.basic
Import brl.blitz
Import brl.filesystem


Function Test()
	Local a:TStream = WriteFile("angeldanieltest.txT")
	WriteLine(a,"Hello World")
	CloseStream(a)
End Function

I rebuilt the modules. I restarted. I reloaded blitzmax. By doing:
import "angeldaniel.ctest"
Test()

the module code works and writes the file. So the module itself is okay.

Then I created a new screensaver framework in XCode. I dragged the ctest.release.macos.ppc.a file into the `Frameworks and Libraries` section in XCode, under Frameworks and Libraries > Other Frameworks, after the foundation.framework and application.framework, and copied the file into the app's folder.

I then went into the target for the screensaver and added a `rule` that says that any files whose name matches *.a performs a custom script, and in the custom script line I put "bcc". I made a copy of `bcc` itself and put it in the developer/tools folder. Not sure if I have to specify a path here? Also do I put a path for where the output files go? Does bcc need some command line parameters? How should that appear as `script`?

I put a line in the PaulSaver.m file that says:

void extern Test(void);

right after the #import "paulsaverview.m"

(not sure if this is the right way of making the blitz function available for use? Does this define it as a prototype or as an actual function?)

When I try to compile the XCode screensaver at this point, it almost gets there but has one error with regards to the .a file:

PaulSaver:0: can't locate file for: -lctest.release.macos.ppc

I don't know what this means, what file is trying to be referenced or where.

As such the app fails to compile all the way.

Is there anything I need to do with the ctest.release.macos.ppc.i file?

If anyone could help with clarifying what each step needs to be to get this working right I'd really appreciate it. I haven't really used XCode before.