Re: cocoa-java problem
Re: cocoa-java problem
- Subject: Re: cocoa-java problem
- From: James Duncan Davidson <email@hidden>
- Date: Fri, 17 Jan 2003 10:38:36 -0800
On Friday, Jan 17, 2003, at 04:45 US/Pacific, George McFly wrote:
I need some help with cocoa-java programming. I'm kind of new to the
cocoa programming but I know java. I've downloaded some tutorial on how
to develop simple cocoa-java app called Temperature Converter. I
followed
all the instructions step-by-step (twice) as it is in the tutorial but
I
can NOT compile this app. I'm getting errors ( two of them) saying
something like that:
file or folder not found: Temperature
file or folder not found: Converter_Prefix.h
Well, I looked in the folder with all the files that the Project
Builder
created and there is file called: Temperature Converter_Prefix.h
Project Builder, as of the latest rev, started creating _Prefix.h files
auto-magically when you start a Cocoa project. The problem is that it
uses the project name, in this case "Temperature Converter" and the
space is preserved in the _Prefix.h file. Then, it seems that the tool
chain can't handle files with spaces in them and you'll see the errors
above.
This is going to affect any example with spaces in it's project
name--and my book has a few of them. Argh.
[[[Question for any PB folks: Will the toolchain be fixed to handle
files with spaces in them, or will the generation of the _Prefix.h
filename be changed, or should we now be super-duper careful about
telling people "No spaces in project names or file names?"]]]
So, what is the _Prefix.h file? It's for precompiled headers which
speed up your compilation cycle (after the first time round).
Test case:
1) Create a new Cocoa project named "Asdf asdf"
2) Build
Output:
Missing file or directory: Asdf
Missing file or directory: asdf_Prefix.h
There are a few workarounds:
1) Create the project without a space in its name, ie
"TemperatureConverter"
2) Rename the *_Prefix.h file, preferable
3) Remove the *_Prefix.h file, reverts to how things were done before
To do step 2)
1) Rename the "Asdf asdf_Prefix.h" file to "Asdfasdf_Prefix.h"
2) Click the targets tab
3) Click the "Asdf asdf" target
4) In the outline view go to Settings --> Simple View --> GCC Compiler
Settings
5) Edit the Prefix Header entry to match the new name
To do step 3)
1) Delete the *_Prefix.h file
2) Go to the target, Settings --> Simple View --> GCC Compiler Settings
3) Remove the *_Prefix.h from the Prefix Header Entry
--
James Duncan Davidson
email@hidden
[life live];
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.