Hi. I am developing my first game for steam. It's a 2D game with SFML and OpenGL in Linux.
I am developing in Linux Mint with XFCE:
OS: Linuxmint 20.3 una
Kernel: x86_64 Linux 5.4.0-100-generic
Uptime: 52m
Packages: 3127
Shell: bash
Resolution: 3286x1080
DE: Xfce
WM: Xfwm4
WM Theme: Mint-Y
GTK Theme: Mint-Y [GTK2]
Icon Theme: Mint-Y
Font: Ubuntu 10
Disk: 383G / 598G (68%)
CPU: Intel Core i5-3330 @ 4x 3.2GHz [51.0°C]
GPU: NVE4
RAM: 3675MiB / 15971MiB
I have one C++ project using the QTcreator IDE. I compile SFML for my linux and I am using the lates version 2.5.1.
I download the steam SDK from this link
https://partner.steamgames.com/downloads/steamworks_sdk.zip and I attach the library in my QTcreator project.
The problem is when I add the steam lib it crash. In debug it crash when I declare the sf::RenderWindow window;
I create another project with just an SFML example:
#include <SFML/Graphics.hpp>
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
// window.draw(...);
// end the current frame
window.display();
}
return 0;
}
And I attach the SFML and Steam SDK in my project using this command in project.pro:
LIBS += -lsfml-system -lsfml-window -lsfml-graphics
LIBS += -L$$PWD/lib/linux64/ -lsdkencryptedappticket -lsteam_api
It compiles very good, but when I run the project in debug mode, it crash exacly in this line:
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
Have someone try to make an SFML project with steam SDK in linux?
I try compile and run it in release mode but in crashes aready.