Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MrFusion

macrumors 6502a
Original poster
Jun 8, 2005
613
0
West-Europe
Hello,

I have a CML program, using obj-c and foundation. Everything works fine under my Mac, even on the command line. There are no compilation errors or runtime errors.

gcc -framework Foundation -Wall classA.m classB.m -o programmeName

Now I have to compile this programme under linux for a colleague. He installed gnustep and foundation libraries (Ubuntu), however he still gets an error if he runs the above command:
gcc: Foundation: No such file or directory
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
gcc: error trying to exec 'cc1obj': execvp: No such file or directory

All help is appreciated.
 

pilotError

macrumors 68020
Apr 12, 2006
2,237
4
Long Island
I thought the linux version used compiler switches versus the framework parameter. There should also be some sample make files laying around. If I remember correctly, the GNUStep stuff ships with a make infrastructure to make it easier to compile. Here's a sample I picked up off the web, take a look and see if it helps.

Code:
gcc-3.0 -c  test.m -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1   -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -DGSWARN -O2 -fgnu-runtime -Wall    -I. -I/usr/lib/GNUstep/System/Headers -fgnu-runtime -I/usr/lib/GNUstep/System/Headers -fconstant-string-class=NSConstantString -I/usr/local/lib/GNUstep/Local/Library/Headers -I/usr/local/lib/GNUstep/Network/Library/Headers -I/usr/lib/GNUstep/System/Library/Headers -I/usr/local/lib/GNUstep/Network/Headers/gnustep -I/usr/local/lib/GNUstep/Local/Headers/gnustep -I/usr/lib/GNUstep/System/Headers/gnustep  -I/usr/local/lib/GNUstep/Network/Headers/ix86/linux-gnu -I/home/timo/GNUstep/Headers/ix86/linux-gnu -I/usr/local/lib/GNUstep/Local/Headers/ix86/linux-gnu -I/usr/lib/GNUstep/System/Headers/ix86/linux-gnu -I/home/timo/GNUstep/Headers -I/usr/local/lib/GNUstep/Local/Headers -I/usr/local/lib/GNUstep/Network/Headers -I/usr/lib/GNUstep/System/Headers  -o test.o
 

MrFusion

macrumors 6502a
Original poster
Jun 8, 2005
613
0
West-Europe
I thought the linux version used compiler switches versus the framework parameter. There should also be some sample make files laying around. If I remember correctly, the GNUStep stuff ships with a make infrastructure to make it easier to compile.

No idea. I never had to do anything more complicated than
compiler inputfile outputfile
./outputfile
After this basic stuff, I went to xCode which takes care of more complicated and larger projects. I never did anything with make files and such.
The programme I have to compile now, is also fairly easy. It has just two classes and that is it.

Here's a sample I picked up off the web, take a look and see if it helps.

Code:
gcc-3.0 -c  test.m -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1   -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -DGSWARN -O2 -fgnu-runtime -Wall    -I. -I/usr/lib/GNUstep/System/Headers -fgnu-runtime -I/usr/lib/GNUstep/System/Headers -fconstant-string-class=NSConstantString -I/usr/local/lib/GNUstep/Local/Library/Headers -I/usr/local/lib/GNUstep/Network/Library/Headers -I/usr/lib/GNUstep/System/Library/Headers -I/usr/local/lib/GNUstep/Network/Headers/gnustep -I/usr/local/lib/GNUstep/Local/Headers/gnustep -I/usr/lib/GNUstep/System/Headers/gnustep  -I/usr/local/lib/GNUstep/Network/Headers/ix86/linux-gnu -I/home/timo/GNUstep/Headers/ix86/linux-gnu -I/usr/local/lib/GNUstep/Local/Headers/ix86/linux-gnu -I/usr/lib/GNUstep/System/Headers/ix86/linux-gnu -I/home/timo/GNUstep/Headers -I/usr/local/lib/GNUstep/Local/Headers -I/usr/local/lib/GNUstep/Network/Headers -I/usr/lib/GNUstep/System/Headers  -o test.o

Thanks.
I tried it, but I get that "Foundation/Foundation.h" is not found.
 

Cromulent

macrumors 604
Oct 2, 2006
6,816
1,101
The Land of Hope and Glory
The foundation framework is an Apple framework surely? Most of that is just old Carbon APIs that have been brought up to date and lay the foundation for other Cocoa frameworks.

I didn't think GNUstep supported it.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
The foundation framework is an Apple framework surely? Most of that is just old Carbon APIs that have been brought up to date and lay the foundation for other Cocoa frameworks.

I didn't think GNUstep supported it.

I think you're thinking of CoreFoundation ;)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.