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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kraken

Pages: [1]
1
After some experimentation, a clean make only works sometimes. I can find no consistent reason, but this error continues to appear. Sometimes after a successful build I will rebuild and it will break again. I think this might have something to do with Vscode's default cmake commands.

2
I have been attempting to build SFML with cmake for integration with my own cmake build system to ensure that it works with any compiler for cross platform development. After messing around with different configurations, I have found a strange problem that I cannot find any solution to.

I am on windows 11, working with MSVC 2019 and Mingw32. To ensure that I am not the source of this error, I am using a fresh clone of https://github.com/SFML/cmake-sfml-project/. Configuring and compiling works fine for both systems, but when linking, I get the same error:

This is the MSVC 2019 error:
LINK : fatal error LNK1104: cannot open file 'optimized.lib'

and this is the Mingw32 error:
x86_64-w64-mingw32/bin/ld.exe: cannot find -loptimized: No such file or directory
x86_64-w64-mingw32/bin/ld.exe: cannot find -ldebug: No such file or directory

I don't think that there is an actual library named debug or optimized that is missing, instead some configuration is messed up somehow.
After some research, the only issue I could find this could be connected to is a way of specifying debug and release linking:

target_link_libraries(${PROJECT_NAME}
    optimized mylib-release
    debug mylib-debug
)

But after some digging, neither the template cmakeLists.txt nor the SFML build cmakeLists.txt includes anything in this format. I'm at a loss for what to do here.

3
Ah, I understand now.
I've decided to switch to visual studio instead and it is working perfectly, thank you for the help.

4
Wait, what do you mean? I'm using MinGW 32bit and that's the exact package I'm using. What am I missing?

5
I successfully compiled the example program with g++ on windows 11, but when I run the program, I get a popup window with this message:

the procedure entry point _ZSt28__throw_bad_array_new_lenghtv could not be located in the dynamic link library "C:\SFML-projects\template\sfml-window-2.dll"

SFML-projects\template is my project folder, and I copied all the .dll files there.

I am using MinGW 32, and the "SFML-2.6.0-windows-gcc-13.1.0-mingw-32-bit" package from the downloads page.

How do I fix this?

Pages: [1]
anything