Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Error executing very simple SFML Code  (Read 1393 times)

0 Members and 1 Guest are viewing this topic.

grejak

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error executing very simple SFML Code
« on: December 28, 2015, 09:01:20 pm »
Hey :)

I recently bought a Raspberry Pi 2B and downloaded and succesfully compiled SFML  on it.
I can compile this little program using:

g++ sfml.cpp -o sfml -lsfml-system -lsfml-window -lsfml-graphics

#include <iostream>
#include "SFML/Graphics.hpp"

int main()
{
  sf::Window window(sf::VideoMode(800,600),"Title");
  return 0;
}
 

But when I try to execute it I get the following Error Message:

Failed to get visual info
Failed to create window
X Error of failed request: BadWindow (invalid Window.parameter)
 Major opcode of failed request : 3 (X_GetWindowAttributes)
« Last Edit: December 28, 2015, 09:43:20 pm by grejak »

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Error executing very simple SFML Code
« Reply #1 on: December 28, 2015, 10:53:25 pm »
Raspsberry pi uses openGL ES, and sfml support it.
But probably SFML dosen't have the work arrounds and the #defines for handling raspberry pi system and graphics.
I would like a spanish/latin community...
Problems building for Android? Look here

grejak

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error executing very simple SFML Code
« Reply #2 on: December 28, 2015, 11:39:13 pm »
Problem was that the Standard Bits per Pixel (=32) was not a valid argument .
So after changing it into 16 in the Constructor it worked just fine :)