iDevGames Forums
Obj-C on Linux - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Tools & Technology (/forum-10.html)
+--- Thread: Obj-C on Linux (/thread-7165.html)

Pages: 1 2 3


Obj-C on Linux - Steven - Apr 7, 2003 04:46 PM

This is probably a stupid question, and I don't expect much of a response other than 'No', but here goes...

Is it possible to use Objective C and the Foundation framework on a Debian Linux machine?
Thanks,
Steven


Obj-C on Linux - OneSadCookie - Apr 7, 2003 04:50 PM

Yes, for some definition of yes Smile

Check out GNUStep -- http://www.gnustep.org/


Obj-C on Linux - Steven - Apr 7, 2003 09:27 PM

I've spent all afternoon downloading and fiddling- I'm now stuck where gcc can't compile (my other version was too old)
It's complaining that
Quote:checking whether the C compiler (gcc -g -O2) works... no
configure: error: installation or configuration problem: C compiler cannon create executables

How do I fix this?
Thanks,
Steven


Obj-C on Linux - OneSadCookie - Apr 7, 2003 10:04 PM

Does gcc work?


Obj-C on Linux - Steven - Apr 8, 2003 06:32 AM

Blush
No, it doesn't. I don't have the standard includes- like stdio.h
I have no clue why, as gcc is installed. How can I install them?
Thanks,
Steven


Obj-C on Linux - OneSadCookie - Apr 8, 2003 12:53 PM

Looks like you need the libc6-dev package on Debian. You may be able to use 'sudo apt-get install libc6-dev'.


Obj-C on Linux - Steven - Apr 8, 2003 01:13 PM

Thanks, I'll do that when I get home from school...
Steven


Obj-C on Linux - Steven - Apr 8, 2003 05:15 PM

It seems to work now, it's been compiling for something like the last hour...
Steven


Obj-C on Linux - Steven - Apr 8, 2003 06:57 PM

Still compiling... wow, GCC is HUGE!!! I haven't even started on GNUStep yet... almost three hours now.
Steven


Obj-C on Linux - Steven - Apr 9, 2003 04:51 PM

Still compiling GCC, almost 24 hours now...
Steven


Obj-C on Linux - Steven - Apr 10, 2003 04:21 PM

I installed gcc, then compiled and installed gnustep-base-1.5.0 and gnustep-make-1.5.0
I then followed the instructions and tried to do a
Quote:defaults write NSGlobalDomain NSLanguages "English"
and it said
Quote:defaults: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
I can't figure out why this would happen.
Steven


Obj-C on Linux - Steven - Apr 10, 2003 05:11 PM

I managed to fix it by reinstalling it. More later on how it works.
Steven


Obj-C on Linux - Steven - Apr 10, 2003 07:58 PM

Ok, everything seems to be working now. Only problem is that it can't find Foundation.h.
Quote:steven@hplmss1:~/war$ gcc main.m
main.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header file
main.m:1:34: Foundation/Foundation.h: No such file or directory
In file included from main.m:2:
CardStack.h:9:34: Foundation/Foundation.h: No such file or directory
In file included from CardStack.h:10,
from main.m:2:
Card.h:9:34: Foundation/Foundation.h: No such file or directory
In file included from CardStack.h:10,
from main.m:2:
Card.h:14: cannot find interface declaration for `NSObject', superclass of `Card'
How do I include the Foundation framework? Also, is it safe to assume that #import will be ok to use, or must I really change it?
Thanks,
Steven


Obj-C on Linux - Steven - Apr 10, 2003 08:01 PM

Oh, and one more thing: can I use frameworks like MOKit.framework? If so, how? Thanks a bunch!
Steven


Obj-C on Linux - OneSadCookie - Apr 10, 2003 08:08 PM

Looks like you need to include <Foundation/NSObject.h>, <Foundation/NSString.h>, &c.

You shouldn't use #import with GNUStep. All the include stuff is going to be different on the two platforms, you'll just have to #ifndef it.

External frameworks & libraries will probably need a bit of porting (changing includes, &c). Some will already have been ported.

Google is your friend.