SFML community forums

Help => General => Topic started by: lzr on June 30, 2008, 01:08:24 am

Title: Windows in Linux
Post by: lzr on June 30, 2008, 01:08:24 am
I'm working on compiling my game in Linux and I'm getting weird problems. For some reason, none of the windows I create have title bars. In addition, when I close the windows, whatever was on them lingers until I drag something over it forcing a redraw. When I set a windows to be fullscreen, and then quit, it doesn't automatically return to the original resolution. Lastly, the sound seems to click a lot.

This happens even in the sampl;e programs even if I don't compile anything. I'm running Ubiuntu 8.04, and SFML 1.3.
Title: Windows in Linux
Post by: Laurent on June 30, 2008, 03:08:57 am
Hi

Unfortunately, there are a lot of problems with Ubuntu 8.04. The only thing I can help you with, is the sound : you can try to use the latest version of openal-soft instead of OpenAL.

Have you tried also recompiling SFML yourself ? It should make any difference, but who knows.

I'm sorry I can't help much with Ubuntu 8.04 issues, every time I try to upgrade my 7.10 it fails.
Title: Windows in Linux
Post by: Ltp0wer on June 30, 2008, 03:44:42 am
Quote from: "Laurent"
Hi

Unfortunately, there are a lot of problems with Ubuntu 8.04. The only thing I can help you with, is the sound : you can try to use the latest version of openal-soft instead of OpenAL.

Have you tried also recompiling SFML yourself ? It should make any difference, but who knows.

I'm sorry I can't help much with Ubuntu 8.04 issues, every time I try to upgrade my 7.10 it fails.


I can't even get SFML to compile. (Running Ubuntu 8.04)
Code: [Select]
In file included from WindowImpl.cpp:40:
../../SFML/Window/Linux/WindowImplX11.hpp:33:22: error: X11/Xlib.h: No such file or directory
../../SFML/Window/Linux/WindowImplX11.hpp:34:20: error: GL/glx.h: No such file or directory
In file included from WindowImpl.cpp:40:
../../SFML/Window/Linux/WindowImplX11.hpp:163: error: ‘XVisualInfo’ has not been declared
../../SFML/Window/Linux/WindowImplX11.hpp:163: error: ‘XVisualInfo’ has not been declared
../../SFML/Window/Linux/WindowImplX11.hpp:193: error: ‘Bool’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:201: error: ‘XEvent’ has not been declared
../../SFML/Window/Linux/WindowImplX11.hpp:211: error: ‘KeySym’ has not been declared
../../SFML/Window/Linux/WindowImplX11.hpp:232: error: ISO C++ forbids declaration of ‘Display’ with no type
../../SFML/Window/Linux/WindowImplX11.hpp:232: error: invalid use of ‘::’
../../SFML/Window/Linux/WindowImplX11.hpp:232: error: expected ‘;’ before ‘*’ token
../../SFML/Window/Linux/WindowImplX11.hpp:237: error: ‘XIM’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:242: error: ‘Window’ in namespace ‘::’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:244: error: ‘GLXContext’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:245: error: ‘Atom’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:247: error: ‘Cursor’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:248: error: ‘XIC’ does not name a type
../../SFML/Window/Linux/WindowImplX11.hpp:163: error: ‘XVisualInfo’ was not declared in this scope


:(
Title: Windows in Linux
Post by: Laurent on June 30, 2008, 03:55:17 am
You need a few external libraries, SFML is not just plain standard C++ ;)

From what I see, you need at least Xlib and GLX development libraries.
Title: Windows in Linux
Post by: lzr on June 30, 2008, 05:08:18 am
I did compile it and it doesn't seem to make a difference.
Title: Windows in Linux
Post by: Laurent on June 30, 2008, 05:15:04 am
Do you have anything special regarding window manager ? Or do you use the default one with default configuration ?
Title: Windows in Linux
Post by: lzr on June 30, 2008, 05:28:32 am
Everything is default. I only have it installed to compile my game, so the only software on it is used to compile the game. It is running in Wubi if that makes a difference.
Title: Windows in Linux
Post by: christoph on June 30, 2008, 05:54:38 pm
for those build failures I suggest to install apt-file ;)

You can run apt-file search X11/Xlib.h and it will printout the package you need to install.
Title: Windows in Linux
Post by: lzr on July 01, 2008, 08:38:40 am
I'm using openal-soft, and it still clicks. I tried it on a friends computer, who was also using openal-soft, and it clicks there too. I got the border to show when I turned off the Visual Effects in the Appearance Properties window, but putting them on Normal or extra causes the border to no longer work.
Title: Windows in Linux
Post by: Xylankant on July 01, 2008, 07:58:17 pm
Hi lzr,

I suggest you're using either KDE or Gnome with Beryl/Compiz as Window-Manager, am I right?
If that's the case, I'm affraight it's an Beryl/Compiz - Issue.
So far, I don't know what causes this problem, but me and a friend of mine are able to reproduce it with Compiz under Linux, so there should be done something with tweaking the Window-Manager...
Title: Windows in Linux
Post by: lzr on July 02, 2008, 02:10:40 am
I'm starting to think, at least the window issue (not the sound) is an Ubuntu or Gnome issue. Blender has the exact same issues as programs I compile with SFML.
Title: Windows in Linux
Post by: Xylankant on July 02, 2008, 01:53:19 pm
Well, it's definitely not a Gnome issue, as I'm right now trying reproducing it under Fedora 9 with Gnome as desktop.
But yes, might be somehow related to Ubuntu (are you using Hardy? Hardy is a bit buggy anyway...).

However, I'm going to test under Fedora 9 with Compiz and report on that later on...
Title: Windows in Linux
Post by: Avency on July 02, 2008, 01:58:53 pm
I also think that the window issue has something to do with compiz.
It doesn't play nice with OpenGL applications (Blenders interface is OpenGl based as well).
But I've never had the problem that you describe (except Blender, which refuses to run in windowed mode). Try to update your graphics drivers or use a different window manager.
Title: Windows in Linux
Post by: Haze on July 03, 2008, 04:57:46 am
Quote from: "christoph"
for those build failures I suggest to install apt-file Wink

You can run apt-file search X11/Xlib.h and it will printout the package you need to install.

Yes, here the packages i've installed in order to compile SFML :
- libopenal-dev
- libxrandr-dev
- libsndfile1-dev
Perhaps it should be added in the "SFML and Linux (gcc)" tutorial, it's useful for Linux/APT users (Debian, Ubuntu...) who want/need to compile SFML.

By the way, the download link in this tutorial is broken : http://www.sfml-dev.org/tutorials/1.3/start-linux.php
Title: Windows in Linux
Post by: zac on August 13, 2008, 10:54:59 pm
I also know this issue from other games (for example Nexius). I think it is a compiz problem, because after uninstalling compiz, everything works fine.
Title: Windows in Linux
Post by: Ankou on August 14, 2008, 06:14:39 pm
Quote
You need a few external libraries, SFML is not just plain standard C++  

From what I see, you need at least Xlib and GLX development libraries.

But normally there's a ./configure which checks for those libraries ^^

However:
I just wanted to say, that I'm also using Ubuntu 8.04 with Compiz Fusion and I never had graphical problems(however, the sound isn't working, but that's another topic). It worked with activated compiz as well as with metacity.