トップページ > プログラム > 2014年05月23日 > w10M27AR

書き込み順位&時間帯一覧

9 位/88 ID中時間01234567891011121314151617181920212223Total
書き込み数0000010000010000000000002



使用した名前一覧書き込んだスレッド一覧
デフォルトの名無しさん
GCCについて part10

書き込みレス一覧

GCCについて part10
415 :デフォルトの名無しさん[sage]:2014/05/23(金) 05:46:56.69 ID:w10M27AR
gcc で objective-c をコンパイルするにはどうすればいいの?
http://ideone.com/vLTMFt
コンパイル時エラー
$ gcc hello.m -l objc
hello.m: 関数 ‘main’ 内:
hello.m:16:3: 警告: ‘Hello’ may not respond to ‘+alloc’ [デフォルトで有効]
id obj = [Hello alloc];
  ^
hello.m:16:3: 警告: (Messages without a matching method signature [デフォルトで有効]
hello.m:16:3: 警告: will be assumed to return ‘id’ and accept [デフォルトで有効]
hello.m:16:3: 警告: ‘...’ as arguments.) [デフォルトで有効]
手元の環境
$ gcc -v
組み込み spec を使用しています。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/lto-wrapper.exe
ターゲット: x86_64-pc-cygwin
configure 設定: /cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2/configure
--srcdir=/cygdrive/i/szsz/tmpp/cygwin64/gcc/gcc-4.8.2-3/src/gcc-4.8.2
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec
--datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin
--host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
(いくつか略)
--disable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm --enable-libquadmath
--enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl
--without-libiconv-prefix --without-libintl-prefix --with-system-zlib --libexecdir=/usr/lib
スレッドモデル: posix
gcc バージョン 4.8.2 (GCC)
GCCについて part10
417 :デフォルトの名無しさん[sage]:2014/05/23(金) 11:15:03.37 ID:w10M27AR
ごめんなさい、吐かれたコードを実行しても、標準出力になにもでてこないのです
同じことを 4.5 でやると警告も出ず、ふつうに hello world なんですが


※このページは、『2ちゃんねる』の書き込みを基に自動生成したものです。オリジナルはリンク先の2ちゃんねるの書き込みです。
※このサイトでオリジナルの書き込みについては対応できません。
※何か問題のある場合はメールをしてください。対応します。