LinuxQuestions.org
Visit Jeremy's Blog.
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 11-25-2012, 10:03 PM   #1
Ace Blackwell
Member
 
Registered: Mar 2004
Location: Kentucky, USA
Distribution: SlamD 12.1 / Slack 12.0 ~ 14.2_64
Posts: 345

Rep: Reputation: 54
C++ Allegro Program works in KDE/Term but not console


I'm using Allegro 4.2 on Slackware 14.0_64. When I program a simple graphic program within KDE and run from a terminal, the program works. however due to KDE screen resolution issue, I have to compiler and run from the console prior to loading KDE. The issue is Allegro gives me an error.

Unable to initialize Allegro
Segment Fault.

However the same program works fine in Term without even recompiling.

Has anyone had this issue before and is there a work around. I need to be able to run the program from the prompt. If I run in KDE, the 640x480 resolution, will not show up on the screen correctly. T?he lower half of the screen isn't viewable. Its below the taskbar.

Thanks
Ace
 
Old 11-26-2012, 07:47 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,850

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
have you set your DISPLAY variable properly?
 
Old 11-26-2012, 11:16 AM   #3
Ace Blackwell
Member
 
Registered: Mar 2004
Location: Kentucky, USA
Distribution: SlamD 12.1 / Slack 12.0 ~ 14.2_64
Posts: 345

Original Poster
Rep: Reputation: 54
Pan64 - I have changed my resolution at the prompt (lilo.conf) to 800x600x32 from 80x25 text. I would think it would accept 640x480. It does on various old DosBox games.

This goal was a work around for another issue I am having. My programs/simple graphics will not run under KDE terminal. I'm going to go back and try to fix the original issue.

Not to hijack this thread but the original issue is when running any of my graphical programs in KDE TERM, the screen resolution changes to match the program but will not fit on screen. I'm currently running KDE at 1200x800 and when my program drops into 640x480, the bottom 1/4 of the screen can't been seen. It doesn't adjust the 640 width so the entire 480 can be seen.

However, when I ran my coded programs from the prompt, they ran fine. (excluding the one I started the thread about). Also when I ported to Windows using Allegro, they worked fine. It was only in KDE terminal that the programs wouldn't work. So given I haven't found a way to correct, I have been looking for a way to compile and run from the prompt console. And then I got this issue on top of it. So now I can't run from the prompt or see from Terminal.

As a side note. When I simply change resolution in KDE to 640 x 480 prior to running terminal, I get the same results. KDE will not fit the screen and I have to guess at the menu to change back. Lastly, I know my recent prompt issue has something to do with the change in resolution in lilo.conf (from 80x25 text to 800x600x32 graphical) I still don't see why it shouldn't work.

Along with this issue, I think I will tackle the KDE issue again. It will do me no good to have the prompt/Allegro fixed, if I still can't run them from the GUI.

Thanks
Ace
 
Old 11-28-2012, 10:45 AM   #4
Ace Blackwell
Member
 
Registered: Mar 2004
Location: Kentucky, USA
Distribution: SlamD 12.1 / Slack 12.0 ~ 14.2_64
Posts: 345

Original Poster
Rep: Reputation: 54
I am going to continue to try to get my prompt situation figured out. Meanwhile I was able to get my programs to run in KDE so I can see the entire screen. I was able to change my program to use •GFX_AUTODETECT_WINDOWS instead of just GFX_AUTODETECT. This allows me to see the entire 640x480. (Allegro)

Hope this helps someone,
Ace
 
  


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
Errors in Allegro in a C++ program, compiled with gcc, in a Linux console AlegroGuy Programming 9 11-17-2010 07:17 PM
Can I change the console's flashing cursor speed (not X term) hobbestec Linux - General 1 04-30-2008 04:56 AM
Having trouble debugging a program. Uses gtk, cairo, and allegro. Winter Knight Programming 1 07-26-2007 01:46 AM
Fullscreen console apps in GNU Screen in an X term (of some sort) problems. bugmenot60 Linux - Software 6 07-21-2006 04:48 AM
mouse cursor dissapers in KDE but works in console. using Slack 9.1 dom m Linux - Software 2 12-21-2003 12:54 PM

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

All times are GMT -5. The time now is 11:42 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