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

Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
31
Window / Re: trouble running sample code from tutorial
« Last post by eXpl0it3r on May 03, 2025, 12:37:36 pm »
Make sure you're really compiling the code you've copied here. For example check that only the wanted *.cpp file is being compiled and not something else.
Make sure you're compiling with C++17 enabled.

What's the complete error you're getting?

The code should beyond the missing header include be correct.
32
General discussions / Re: SFML 3, iOS toolchain?
« Last post by eXpl0it3r on May 03, 2025, 12:34:30 pm »
This issue should have already been fixed with SFML 3: https://github.com/SFML/SFML/pull/2885

Are you sure, you're using SFML 3?

Can you provide the error and source of the error in full?
33
Window / trouble running sample code from tutorial
« Last post by dwfunk4475 on May 03, 2025, 08:41:45 am »
Windows 11, MingW64, built SFML.

On the tutorial "Opening and managing an SFML window". Running the sample code, I get the error "event was not declared in this scope."
What have I overlooked?



Code: [Select]

#include <SFML/Window.hpp>


int main()
{
    sf::Window 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
        while (const std::optional event = window.pollEvent())
        {
            // "close requested" event: we close the window
            if (event->is<sf::Event::Closed>())
                window.close();
        }
    }
}
34
General discussions / Re: SFML 3, iOS toolchain?
« Last post by Static on May 02, 2025, 10:20:56 pm »
Thanks, this helped a lot to move on!

When finally trying to build a test app in Xcode 18.4 I got an error: Implicit instantiation of undefined template 'std::char_traits<unsigned int>'

ChatGPT gives an answer, but I don't know if this is the real case here:

That error —
“Implicit instantiation of undefined template ‘std::char_traits<unsigned int>’” —
means some code is trying to use std::basic_string<unsigned int>, which is not allowed because std::char_traits<unsigned int> is not defined by the standard library (libc++ doesn't support it).

This issue has come up in SFML, especially when trying to build for iOS using libc++, which is more strict than libstdc++.

35
General discussions / Re: SFML 3, iOS toolchain?
« Last post by eXpl0it3r on May 02, 2025, 07:27:32 pm »
We're utilizing the native iOS support by CMake, so the toolchain file is no longer needed.

Add -DCMAKE_SYSTEM_NAME=iOS to compile for iOS with CMake.
36
General discussions / SFML 3, iOS toolchain?
« Last post by Static on May 02, 2025, 04:56:54 pm »
Hi,

there is no iOS.toolchain.cmake file anymore available with source code.

Is there one available somewhere?



 
37
System / Re: Linker cannot open sfml-system-d-3.lib file.
« Last post by eXpl0it3r on May 02, 2025, 08:01:22 am »
If you check the tutorial again, you'll see that it should be sfml-system-d.lib without the -3. Only the DLL itself will have the -3.
38
System / Linker cannot open sfml-system-d-3.lib file.
« Last post by Zerst18 on May 02, 2025, 05:43:53 am »
Hello, everyone. Lately, I have been trying to setup SFML. After following the tutorial, https://www.sfml-dev.org/tutorials/3.0/getting-started/visual-studio/, and correctly linking everything and setting it all up, I tried to run the example code listed in the tutorial, however, I got the error: cannot open file 'sfml-system-d-3.lib'. I could not find any other articles on why this issue occurs or how to fix it. This is probably some beginner mistake, but all help is appreciated.

Thanks.
39
General / Re: qualified-id in declaration before ‘event’
« Last post by eXpl0it3r on May 01, 2025, 08:02:45 am »
Ubuntu doesn't yet ship SFML  in the package manager, or rather only on experimental.

We usually recommend to use the CMake template, that will automatically build SFML for you: https://github.com/SFML/cmake-sfml-project
40
General / Re: qualified-id in declaration before ‘event’
« Last post by branrjab on May 01, 2025, 12:40:38 am »
WOW! Thanks. You pegged it perfectly.

I manually installed on Windows and choose 3.0. For Ubuntu I used the package manager and the command  apt-get install libsfml-dev    which installed Version 2.5.1.

I now know how to check what version by looking at the Config.hpp

I'll see if I can figure out how to install 3.0 on Ubuntu,

Thanks so much for the help.
Pages: 1 2 3 [4] 5 6 ... 10
anything