请教SDL编程,SDL_Init No available video device
请教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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ubuntu 默认的就应该是图形界面启动啊...
找不到设备,是不是没启动xserver图形界面呀?