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)
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?
Obj-C on Linux - OneSadCookie - Apr 7, 2003 04:50 PM
Yes, for some definition of yes
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
How do I fix this?
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
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?
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...
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...
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.
Obj-C on Linux - Steven - Apr 9, 2003 04:51 PM
Still compiling GCC, almost 24 hours now...
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 directoryI can't figure out why this would happen.
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.
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.mHow 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?
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!
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.