- 论坛徽章:
- 0
|
请教SDL相关编程,
编写相关程序,在编译成功后,运行程序的时候提示错误:
SDL_Init No available video device
官网的解释是:
网址为: http://www.libsdl.org/faq.php?ac ... s&category=3#25
摘录关键如下:
Q: I get the error: "no video devices available"
A: SDL doesn't use the X11 video driver if it can't open the X display, and if no other drivers are available, it will report this error.
To fix this, set your display environment variable appropriately:
sh: DISPLAY=:0 ; export DISPLAY
csh: setenv DISPLAY :0
If you still have problems, try running xhost + localhost
Finally, if all those didn't work, and you built SDL from source, make sure that you have the X11 development libraries installed, otherwise you'll get a version of SDL that doesn't include X11 display support. After you install the X development libraries, you need to "make clean" and then rerun the configure and build process.
也不大明白应该怎么操作,希望懂的牛人能帮助下
谢谢!
我用的OS是 Ubuntu 7.10
SDL源码库为 SDL-1.2.13.tar.gz |
|