[過去ログ] SDLスレ (987レス)
上下前次1-新
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん
このスレッドは過去ログ倉庫に格納されています。
次スレ検索 歴削→次スレ 栞削→次スレ 過去ログメニュー
967: 名前は開発中のものです。 [sage] 2006/02/16(木) 12:16:03 ID:4CJdjj+H(1/9) AAS
Mac OS X 10.3.9なんですが,かなり初歩的な質問をさせてください
SDL-1.2.9フォルダをホームにおいてSDL-1.2.9フォルダにて./configure、make、sudo make install
でSDLをインストールしました(エラーは出ませんでした)
とりあえずしっかりパスが通っていてSDLがインストールされているのを確認するにはどうすればいいんでしょうか?
パスはホームの.tcshrcにsetenv PATH /usr/local/bin:/SDL-1.2.9:$PATH
と記述しただけで通したつもりになっています…。
969: 名前は開発中のものです。 [sage] 2006/02/16(木) 15:13:14 ID:4CJdjj+H(2/9) AAS
>それはさておき /SDL-1.2.9 に入れてそこにパス通すのはどんなもんよ。
すいません正直パスを通す意味がよく分かってません
/SDL-1.2.9/testにて
cc testwin.c `sdl-config --cflags --libs`でコンパイルしたらとんでもないくらいエラー出ました。
あきらかに各種ファイルの不足によるものばかりなのでtestに不足ファイルをいれれば成功しそうですが
それではプログラムを作るたびにそのディレクトリに必要ファイルを入れなければなりません。
どのディレクトリででもSDLのプログラムをコンパイルし実行するにはどのようにすればいいのでしょうか?
973(2): 名前は開発中のものです。 [sage] 2006/02/16(木) 20:24:20 ID:4CJdjj+H(3/9) AAS
シェルをtcshからbashに変えて
~/.bash_profileにexport PATH=$PATH":/SDL-1.2.9"と記述しました
~/SDL-1.2.9 および ~/SDL-1.2.9/testにて
sdl-config --cflags --libsだけで実行すると
-bash: sdl-config: command not found
~/SDL-1.2.9にて
./sdl-config --cflags --libsで実行すると
-I/usr/local/include/SDL -D_THREAD_SAFE
-L/usr/local/lib -lSDLmain -lSDL -framework Cocoa -framework OpenGL
となりました。これはこのディレクトリ内にsdl-configがあるので当たり前なんですが…
974(1): 名前は開発中のものです。 [sage] 2006/02/16(木) 20:39:00 ID:4CJdjj+H(4/9) AAS
~/SDL-1.2.9/testにて
cc testwin.c `sdl-config --cflags --libs`を実行すると
cc: sdl-config --cflags --libs: No such file or directory
testwin.c:12:17: SDL.h: No such file or directory
testwin.c:14: error: parse error before '*' token
testwin.c: In function `DrawPict':
testwin.c:17: error: `SDL_Surface' undeclared (first use in this function)
testwin.c:17: error: (Each undeclared identifier is reported only once
testwin.c:17: error: for each function it appears in.)
testwin.c:17: error: `picture' undeclared (first use in this function)
testwin.c:18: error: `SDL_Rect' undeclared (first use in this function)
testwin.c:18: error: parse error before "dest"
testwin.c:21: error: `SDL_Color' undeclared (first use in this function)
testwin.c:21: error: `colors' undeclared (first use in this function)
testwin.c:21: error: `cmap' undeclared (first use in this function)
testwin.c:24: error: `bmpfile' undeclared (first use in this function)
testwin.c:38: error: parse error before ')' token
testwin.c:39: error: parse error before ')' token
testwin.c:47: error: parse error before ')' token
testwin.c:48: error: parse error before ')' token
testwin.c:63: error: `screen' undeclared (first use in this function)
testwin.c:73: error: `Uint32' undeclared (first use in this function)
testwin.c:73: error: parse error before "black"
testwin.c:74: error: `Uint8' undeclared (first use in this function)
testwin.c:74: error: `pixels' undeclared (first use in this function)
testwin.c:76: error: `black' undeclared (first use in this function)
testwin.c:77: error: parse error before ')' token
testwin.c:88: error: `speedy' undeclared (first use in this function)
testwin.c:89: error: `displayfmt' undeclared (first use in this function)
975: 名前は開発中のものです。 [sage] 2006/02/16(木) 20:40:31 ID:4CJdjj+H(5/9) AAS
testwin.c:102: error: `SDL_HWSURFACE' undeclared (first use in this function)
testwin.c:107: error: `dest' undeclared (first use in this function)
testwin.c:113: error: `update' undeclared (first use in this function)
testwin.c:118: error: `flip' undeclared (first use in this function)
testwin.c:135: error: `nofade' undeclared (first use in this function)
testwin.c:137: error: parse error before "final"
testwin.c:140: error: parse error before "Sint16"
testwin.c:140: warning: no semicolon at end of struct or union
testwin.c:141: error: `cdist' undeclared (first use in this function)
testwin.c:145: error: `maxstep' undeclared (first use in this function)
testwin.c:146: error: `final' undeclared (first use in this function)
testwin.c:149: error: `palcolors' undeclared (first use in this function)
testwin.c:96: error: label `done' used but not defined
testwin.c: At top level:
testwin.c:220: error: parse error before ':' token
testwin.c:223: warning: parameter names (without types) in function declaration
testwin.c:223: error: conflicting types for `free'
/usr/include/stdlib.h:136: error: previous declaration of `free'
testwin.c:223: warning: data definition has no type or storage class
testwin.c:223: warning: parameter names (without types) in function declaration
testwin.c:223: warning: data definition has no type or storage class
testwin.c:224: error: parse error before "return"
976(1): 名前は開発中のものです。 [sage] 2006/02/16(木) 20:41:22 ID:4CJdjj+H(6/9) AAS
testwin.c: In function `main':
testwin.c:229: error: `SDL_Surface' undeclared (first use in this function)
testwin.c:229: error: `screen' undeclared (first use in this function)
testwin.c:235: error: `Uint32' undeclared (first use in this function)
testwin.c:235: error: parse error before "video_flags"
testwin.c:247: error: `video_flags' undeclared (first use in this function)
testwin.c:302: error: `SDL_HWPALETTE' undeclared (first use in this function)
testwin.c:307: error: `SDL_HWSURFACE' undeclared (first use in this function)
testwin.c:312: error: `SDL_DOUBLEBUF' undeclared (first use in this function)
testwin.c:317: error: `SDL_FULLSCREEN' undeclared (first use in this function)
testwin.c:324: error: `SDL_INIT_VIDEO' undeclared (first use in this function)
testwin.c:329: error: `SDL_Quit' undeclared (first use in this function)
testwin.c:353: error: `then' undeclared (first use in this function)
testwin.c:355: error: `now' undeclared (first use in this function)
980: 名前は開発中のものです。 [sage] 2006/02/16(木) 22:24:14 ID:4CJdjj+H(7/9) AAS
ID:6HFR4Et4さんありがとうございます!!
おかげさまでパス通りました!
>>977977(2): 名前は開発中のものです。 [sage] 2006/02/16(木) 21:18:11 ID:/cQBzdnu(1) AAS
>>974 とりあえずはこれでいいかも
cc testwin.c -I. -D_THREAD_SAFE -L. -lSDLmain -lSDL -framework Cocoa -framework OpenGL
シェルの使用法がわかっていないようなので、
先にそちらを理解してからのほうがいいと思う。
さんのコンパイル方法をやってみましたが
全く同じエラーが出たのでまだ入れなければいけないものがあるんでしょうね
本家サイトからとってきて試したいと思います
983: 名前は開発中のものです。 [sage] 2006/02/16(木) 22:36:59 ID:4CJdjj+H(8/9) AAS
コンパイルできちゃいました…
でも実行はどうやって?
./testwinではないのでしょうか?
重ね重ねすいません…
985(1): 名前は開発中のものです。 [sage] 2006/02/16(木) 23:55:15 ID:4CJdjj+H(9/9) AAS
ID:6HFR4Et4さんtestwin実行成功しました
ありがとうございました
いろいろサンプルプログラムを実行していましたがSDL_imageなしで画像を読み込んで使っているプログラムがありましたが
SDL_imageはどのような場合に必要なのでしょうか?これなしでは画像は使えないと思っていました…
上下前次1-新書関写板覧索設栞歴
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル
ぬこの手 ぬこTOP 0.034s