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

Pages: 1 [2] 3 4 ... 623
16
Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 08:24:54 pm »
You aren't "displaying" it on the window, but you're making sure the rendered object on the render texture are actually drawn properly. Before you use the texture of a render texture you have to call display().
See also: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1RenderTexture.php#details

17
Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 09:24:33 am »
You're never calling display on the render texture.

18
You can, but it's not always a good idea to do so.
For you, I'd recommend to just build SFML with SFML_STATIC_STD_LIB set in CMake.

19
Yes, SFML's pre-built static binaries for Visual Studio come with /MD or /MDd.

Based on that alone, static libraries can use /MD /MDd, but you can't mix the runtime types in your application. If you want to use one, the all C++ libraries need to use the runtime setting.

20
Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 12:33:32 am »
To understand what your code is doing you should learn how to use a debugger.
That way you can add a break point where ever your want your code to psss and then step through things step by step.

Are you setting the texture for the monitor sprite?
Are you setting the font on the text objects?
Does the class instance exist until display() is called on the window?

22
General / Re: Linking the SFML using Conan on Linux
« on: November 24, 2019, 01:31:31 pm »
I think this is more related to the ABI change for strings. You'd need to make sure that SFML is also built with the C++17 flag.

23
General / Re: setting SFML on Clion
« on: November 22, 2019, 06:13:53 pm »
Oh!

For some reason CMake is detecting Visual Studio library files .lib instead of the MinGW library files .a
Which makes me question to what exactly you ahve put into the D:/Libraries/SFML/lib directory?

Make sure you download the matching SFML package for your compiler and delete all other, unrelated files.

24
Audio / Re: Using sfml-audio on Windows
« on: November 22, 2019, 06:08:50 pm »
You're using a static (and thus globally) initialized sf::Music, which is not allowed by SFML, as the initialization as well as the destruction order of global objects are undefined an since SFML too uses some globals to hide certain magic.

25
General / Re: setting SFML on Clion
« on: November 22, 2019, 03:56:48 pm »
Can you provide the content of @CMakeFiles\prova1.dir\linklibs.rsp?

26
General / Re: setting SFML on Clion
« on: November 22, 2019, 01:27:50 pm »
Don't know why, but SFML is still not being linked.

Try a verbose build output (google how you can set it up for CMake).

27
General / Re: setting SFML on Clion
« on: November 21, 2019, 04:39:12 pm »
It should link that way. Try to clear your CMake cache.

If it's only related to std::string it might be that you need to recompile SFML with the same C++ standard flag set.

28
General / Re: setting SFML on Clion
« on: November 21, 2019, 12:36:48 pm »
Those are just normal linker errors and pretty unrelated to CLion.
Also kind of unrelated to SFML, understanding how the linker works and how to fix linker errors is a general C++ skill to learn.

Did you change your CMakeLists.txt?
It can't find the SFML symbols for some reason.

29
Audio / Re: Using sfml-audio on Windows
« on: November 21, 2019, 07:57:46 am »
Sounds like something isn't initialized. Can you provide a minimal example that reproduces the issue?

30
General / Re: SFML installed from vcpkg fails to link statically
« on: November 21, 2019, 01:22:05 am »
I discussed with someone on the cpplang Slack and after various CMake focused discussion, it seems that since you presumably use the VS integration (as you didn't provide a CMakeLists.txt file), you have to manually add system libraries, such as winmm.lib (and potentially gdi32.lib).

See also their comment on GitHub.

Pages: 1 [2] 3 4 ... 623
anything