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 - mnr

Pages: [1]
1
General / Re: examples not working
« on: July 01, 2021, 09:38:15 am »
Thank you eXpl0itr3r, the idiot I am I didn't think of running the program via the command line to get the error message.

I just record my solution here, in case somebody else runs into a similar problem (or I run into it again in a couple of years from now)

So here is the solution for the problem I had:

open a command prompt, and CD to the examples dir, e.g. go to opengl\

Then run opengl > a.txt 2>&1

(I needed to include the magic > a.txt 2>&1 in order to catch the error message, otherwise the program crashes without an error statement, for whatever reason)

The error is now in a.txt , which was in my case "Failed to load image "resources/background.jpg". Reason: Unable to open file"

The problem is now obvious : I compiled using cmake to a build dir which was not the same as the resources dir. The stuff in resources/ was not copied over, so the program couldn't find background.jpg (and the other stuff) and therefore crashed.





2
General / examples not working
« on: June 26, 2021, 04:38:15 pm »
Dear sfml community,

I am trying to build SFML from sources on windows, using cmake and mingw32 and mingw32-make all. I followed the tutorial on the sfml website that explains this (https://www.sfml-dev.org/tutorials/2.5/compile-with-cmake.php and https://github.com/SFML/SFML/wiki/Tutorial%3A-Build-SFML-with-a-MinGW-Compiler).

I have the impression that during compiling all goes well (both for static and shared libraries). However, from the example directory, apart from the one called "window" (rotating cube) none of the examples actually work (island, joystick, opengl, ....) in the sfml-build/examples folder.

For each one the window opens and then quickly closes again.

I have tried looking online what could be wrong, but since I have no error message to search for, I don't know where to look.

My best guess is that maybe some dll file is missing, or perhaps it is compiled with the wrong compiler and then crashes upon loading. But, as explained above, I have compiled from sources with mingw , so I should have the correction versions of the dll's.

Behavior with static or shared compiling is exactly the same: Only the example called "window" works. (Except, in the shared case the examples first complain that they need the dll's, which after copying into the example folder no longer complain)

My compiler version is 11.1.0 (output of gcc -v; target: x86_64-w64-mingw32)

Any ideas on what could be wrong are greatly appreciated!


Pages: [1]