SDL2をダウンロードして
./configure
make
sudo make install
PySDL2をインストールしてcd example/
python draw.py
すると
File "helloworld.py", line 78, in
sys.exit(run())
File "helloworld.py", line 19, in run
sdl2.ext.init()
File "/usr/local/lib/python2.7/dist-packages/sdl2/ext/common.py", line 44, in init
raise SDLError()
sdl2.ext.common.SDLError: 'No available video device'
なぜだと思って
C言語のサンプルをコンパイルして実行すると
$ gcc sdl2.c -I /usr/local/include/SDL2/ -lSDL2
$./a.out
Could not create window: No available video device
とでる
./configure
..
Assembly Math : mmx 3dnow sse sse2
Audio drivers : disk dummy oss
Video drivers : dummy
Input drivers : linuxev linuxkd
Using libudev : YES
Using dbus : YES
のVideo driversがだめだと思い
sudo aptitude install libxext-dev
などどしたところ(記憶で書いてます)
Assembly Math : mmx 3dnow sse sse2
Audio drivers : disk dummy oss
Video drivers : dummy x11(dynamic)
X11 libraries : xshape
Input drivers : linuxev linuxkd
Using libudev : YES
Using dbus : YES
x11が認識された
C言語のサンプルをコンパイルして実行すると
$ gcc sdl2.c -I /usr/local/include/SDL2/ -lSDL2
$./a.out
Could not create window: No OpenGL support in video driver
とでる
OpenGLをインストール
$ sudo aptitude install libgl1-mesa-dev
$ gcc sdl2.c -I /usr/local/include/SDL2/ -lSDL2
$./a.out
エラーは出ず
windowだけ出る
PySDL2のexampleで
python draw.py
をすると成功する
python helloworld.py
とすると
Using software rendering
Segmentation fault
半分くらい成功する
とりあえずここまで
0 件のコメント:
コメントを投稿