LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-18-2006, 06:56 AM   #1
myrmidon
Member
 
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Rep: Reputation: 15
SDL and console


HEllo to all, i'm creating a small SDL program which display some tux.jpg on screen. The program worked greeat, but i reinstalled my Mandrake 9.2 on new HD.

The program still working fine under X enviroment, but when i try to run it from console it wont start , i get an SDL error :

could not initialize SDL : No available video device .



What did i missed to install ?


Best regards...
 
Old 02-18-2006, 10:10 AM   #2
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
you need to have an x display available to sdl..
 
Old 02-19-2006, 04:46 AM   #3
myrmidon
Member
 
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by xhi
you need to have an x display available to sdl..

ok, but meaning what do i need exactly ?
 
Old 02-19-2006, 05:59 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
To be running X. SDL obviously doesn't support drawing to the framebuffer.
 
Old 02-19-2006, 06:49 AM   #5
mic
Member
 
Registered: Jun 2005
Posts: 44

Rep: Reputation: 16
You don't need X for SDL. SDL supports framebuffer. Check these things:

1) Kernel config. You need framebuffer support, check your options for CONFIG_FB* and CONFIG_FRAMEBUFFER_CONSOLE in particular.

2) Configure SDL with --enable-video-fbcon before compiling.

3) If device file /dev/fb0 is missing, create it with:
mknod -m 666 /dev/fb0 c 29 0

That works for me.
 
Old 02-19-2006, 02:54 PM   #6
myrmidon
Member
 
Registered: May 2005
Distribution: redhat 9 , fedora 5,6,7,DSL,Debian 3, mandrake 9.2 , knoppix 3.8, red hat 7.3
Posts: 38

Original Poster
Rep: Reputation: 15
ok thx m8, i will try that. Btw. i KNOW that my SDL program runned without the X, but after i migrated to ne HD , this problem occured.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sourcecompiling Problem...The sdl-config script installed by SDL could not be found. deepclutch Debian 1 12-15-2005 12:15 PM
Trying to program an SDL application but cannot find the SDL.h file:SuSE 9.2&KDevelop pujolasdf Linux - Newbie 4 03-13-2005 07:50 AM
How to Run Win32 Console App in linux Console Lokie Linux - Software 2 08-12-2004 10:00 PM
X server in console 1 crashes on return from console 2 fieldmethods Red Hat 4 09-05-2003 12:12 AM
Sdl? tundra Linux - General 5 05-03-2003 08:17 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration