I am in the very early steps of porting GWorkspace to Mac OS X. I do
this
mainly to make some more developers interested in this project and to
give
Apples Finder (which is a Carbon App) some competition.
At first I created a Project Builder project (.pbproj) and added all the
sources as Folder References. Then I tried to build the thing.
Here I had some troubles with the macros RETAIN, ASSIGN, RELEASE,
TEST_RELEASE and AUTORELEASE since those don't exist on Mac OS X.
My Question is now:
Where do I define such macros (new headerfiles?) and how do I include
them
into the source?
Then there was a discussion about porting GNUMail.app / Pantomime to
MacOS-X on the list some weeks ago:
Ludovic Marcotte wrote:
Hi,
One of my friend is porting GNUMail.app / Pantomime to MacOS-X.
Since GNUstep defines RETAIN(), RELEASE(), and AUTORELEASE() as
placeholders for GC (in a distant future), is it safe to simply define
in both projects:
#ifndef GNUSTEP_BASE_VERSION
Macros should be protected from weird things (such as calling within
other
macros) by forcing them to be evaluated.
#define RETAIN(object) [object retain]
#define RELEASE(object) [object release]
#define AUTORELEASE(object) [object autorelease]
#define RETAIN(obj) [(obj) retain]
#define RELEASE(obj) [(obj) release]
#define AUTORELEASE(obj) [(obj) autorelease]
Other than that, it should be fine.
is this the way to go?
And finally the output the compiler produced when trying to compile
GWorkspace:
/usr/bin/jam -d1
JAMBASE=/Developer/Makefiles/pbx_jamfiles/ProjectBuilderJambase
JAMFILE=-
build ACTION=build TARGETNAME=GWorkspace NATIVE_ARCH=ppc
BUILD_STYLE=Development
CPP_HEADERMAP_FILE=/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.
build/Headermaps/GWorkspace.hmap
DSTROOT=/ OBJROOT=/Volumes/Data/GWorkspace/build/intermediates
SRCROOT=/Volumes/Data/GWorkspace SYMROOT=/Volumes/Data/GWorkspace/build
warning: <GWorkspace>GWorkspace.app depends on itself
...updating 47 target(s)...
Mkdir /Volumes/Data/GWorkspace/build/ProjectHeaders
Mkdir /Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/IconViewsProtocol..
h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/IconViewsIcon.h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/GWSplitView.h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/GWorkspace.h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/Functions.h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/FileOperationProtocol.
h
ImportStub
/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace/FileOperation.h
BuildPhase GWorkspace.app
Completed phase <CopyHeaders> for GWorkspace.app
Mkdir /Volumes/Data/GWorkspace/build/GWorkspace.app/Contents
Mkdir /Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Apps_wrappers
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Watchers
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Viewers
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Shelf
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Recycler
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Processes
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Preferences
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Inspectors
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Finder
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Fiend
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/Dialogs
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/BackWindow
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/backgrounder
Mkdir
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/English.
lproj
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/English.
lproj/InfoPlist.strings
RobustCp.CleanBeforeAndAfter
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Resources/English.
lproj/MainMenu.nib
Cp /Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/Info.plist
Cp
/Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/pbdevelopment.plist
RawEcho /Volumes/Data/GWorkspace/build/GWorkspace.app/Contents/PkgInfo
BuildPhase GWorkspace.app
Completed phase <CopyResources> for GWorkspace.app
Mkdir
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc
CompileC
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
main.o
main.m: In function `createMenu':
main.m:54: warning: implicit declaration of function `AUTORELEASE'
main.m:54: warning: assignment makes pointer from integer without a cast
main.m:59: warning: assignment makes pointer from integer without a cast
main.m:67: warning: assignment makes pointer from integer without a cast
main.m:80: warning: assignment makes pointer from integer without a cast
main.m:89: warning: assignment makes pointer from integer without a cast
main.m:96: warning: assignment makes pointer from integer without a cast
main.m:100: warning: assignment makes pointer from integer without a
cast
main.m:110: warning: assignment makes pointer from integer without a
cast
main.m:117: warning: assignment makes pointer from integer without a
cast
main.m:125: warning: assignment makes pointer from integer without a
cast
main.m:136: warning: `NSMenu' does not respond to `display'
CompileC
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
IconViewsIcon.o
IconViewsIcon.m: In function `-[IconViewsIcon dealloc]':
IconViewsIcon.m:38: warning: implicit declaration of function `RELEASE'
IconViewsIcon.m:39: warning: implicit declaration of function
`TEST_RELEASE'
IconViewsIcon.m: In function `-[IconViewsIcon
initForPaths:inContainer:]':
IconViewsIcon.m:60: warning: implicit declaration of function `ASSIGN'
IconViewsIcon.m:73: warning: implicit declaration of function `RETAIN'
IconViewsIcon.m:90: warning: implicit declaration of function
`AUTORELEASE'
IconViewsIcon.m: In function `-[IconViewsIcon drawRect:]':
IconViewsIcon.m:310: warning: implicit declaration of function
`PSsetalpha'
CompileC
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
GWSplitView.o
GWSplitView.m: In function `-[GWSplitView dealloc]':
GWSplitView.m:36: warning: implicit declaration of function `RELEASE'
GWSplitView.m: In function `-[GWSplitView updateInfo:]':
GWSplitView.m:63: warning: implicit declaration of function `ASSIGN'
GWSplitView.m: In function `-[GWSplitView drawDividerInRect:]':
GWSplitView.m:76: warning: `GWSplitView' does not respond to
`backgroundColor'
CompileC
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
GWorkspace.o
GWorkspace.m: In function `+[GWorkspace gworkspace]':
GWorkspace.m:91: `gnustep_global_lock' undeclared (first use in this
function)
GWorkspace.m:91: (Each undeclared identifier is reported only once
GWorkspace.m:91: for each function it appears in.)
GWorkspace.m: In function `-[GWorkspace dealloc]':
GWorkspace.m:104: warning: implicit declaration of function `RELEASE'
GWorkspace.m:111: warning: implicit declaration of function
`TEST_RELEASE'
GWorkspace.m: In function `-[GWorkspace
applicationDidFinishLaunching:]':
GWorkspace.m:139: warning: implicit declaration of function `ASSIGN'
GWorkspace.m: In function `-[GWorkspace startXTermOnDirectory:]':
GWorkspace.m:395: warning: implicit declaration of function
`AUTORELEASE'
GWorkspace.m: In function `-[GWorkspace showInfo:]':
GWorkspace.m:797: warning: initialization makes pointer from integer
without a cast
GWorkspace.m:811: warning: cannot find method.
GWorkspace.m:811: warning: return type for
`orderFrontStandardInfoPanelWithOptions:' defaults to id
/usr/bin/cc -c "-F/Volumes/Data/GWorkspace/build/ProjectHeaders"
"-F/Volumes/Data/GWorkspace/build"
"-I/Volumes/Data/GWorkspace/build/ProjectHeaders/GWorkspace"
"-I/Volumes/Data/GWorkspace/build/include" "-arch" "ppc" "-fno-common"
"-fpascal-strings" "-O0" "-Wmost" "-Wno-four-char-constants"
"-Wno-unknown-pragmas" "-pipe" "-g" "-precomp-trustfile"
"/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/TrustedPrecomps.
txt"
"-Wp,-header-
mapfile,/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Headermaps/
GWorkspace.hmap"
"-I/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/DerivedSources"
"GWorkspace.m" -o
"/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
GWorkspace.o"
...failed CompileC
/Volumes/Data/GWorkspace/build/intermediates/GWorkspace.build/Objects/ppc/
GWorkspace.o
...
Greetings and thanks for your help, Lars
_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://mail.gnu.org/mailman/listinfo/discuss-gnustep