Linuxの開発言語ツールは、gccである。gccは、今、versionは、4.6まで来た。
ちなみに、手元のDebian wheezyのマシンで、gcc -vとやると
Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6.1/lto-wrapper Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.1-4' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib/i386-linux-gnu --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.6.1 (Debian 4.6.1-4)と出る。
つまり、サポート言語は、
- C
- C++
- Fortran
- Objective-C
- Objective-C++
- Go
ヘッダーファイルもほとんどない ヘッダーファイルは、私の環境では、/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/include/objc/ にあるが、そこにあるのは、
-rw-r--r-- 1 root root 1399 2011-07-15 12:51 NXConstStr.h -rw-r--r-- 1 root root 2242 2011-07-15 12:51 Object.h -rw-r--r-- 1 root root 1588 2011-07-15 12:51 Protocol.h drwxr-xr-x 2 root root 4096 2011-08-05 14:46 deprecated -rw-r--r-- 1 root root 3930 2011-07-15 12:51 encoding.h -rw-r--r-- 1 root root 48 2011-07-15 12:51 hash.h -rw-r--r-- 1 root root 5985 2011-07-15 12:51 message.h -rw-r--r-- 1 root root 12041 2011-07-15 12:51 objc-api.h -rw-r--r-- 1 root root 1483 2011-07-15 12:51 objc-decls.h -rw-r--r-- 1 root root 4823 2011-07-15 12:51 objc-exception.h -rw-r--r-- 1 root root 35 2011-07-15 12:51 objc-list.h -rw-r--r-- 1 root root 2337 2011-07-15 12:51 objc-sync.h -rw-r--r-- 1 root root 7056 2011-07-15 12:51 objc.h -rw-r--r-- 1 root root 52741 2011-07-15 12:51 runtime.h -rw-r--r-- 1 root root 32 2011-07-15 12:51 sarray.h -rw-r--r-- 1 root root 4014 2011-07-15 12:51 thr.h -rw-r--r-- 1 root root 84 2011-07-15 12:51 typedstream.hだけだ。もちろん、この中には、NSObjectもない。
Hello worldは? Wikipediaの記事では、Objective-CのHello worldは、こうであるそうだが、これは、Objective-Cとは認めがたい代物だ。
結論 Linuxの上にあるObjective-Cは使えない。GNUStepの環境を入れれば、使えるようになるのかもしれないが、そういう予定はない。ということで、いまのところ、使えるObjective-Cは、Apple環境だけなのだろう。
このブログにコメントするにはログインが必要です。
さんログアウト
この記事には許可ユーザしかコメントができません。