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

Pages: [1]
1
Audio / Re: Problem with Singletons
« on: May 19, 2023, 01:18:38 pm »
Alright then, so, when comes to the problem of scope I will not be using those SFML resources in Sigleton classes. Thanks  ;).

2
Audio / [SOLVED] Problem with Singletons
« on: May 09, 2023, 12:06:30 am »
There is some problem if I call the destructor of a sf::SoundBuffer before it reaches the normal end of scope!? because I am using a singleton class to store global sounds that can be used for any class in the application, but, the aplication is big enough to require a more smart loading instead load everything at the beginning of the application.

Every time I free those sound buffers by just removing its unique_ptr from a map, when the application reaches the end I've got: 'malloc(): unsorted double linked list corrupted', maybe there is some restriction because the sf::SoundFileFactory that keeps some global info, that will properly RAII at the end of application only!?

For instance, I've only loaded the buffers and freed them. I did not create any sf::Sound or play it, just loaded and freed it by removing the unique_ptr from the map using its 'key' on the 'erase' method.

3
Graphics / Re: Linker error with libfreetype
« on: March 11, 2023, 08:19:27 pm »
Solved.

I simply remove manually this 'libfreetype.a' file from '/usr/local/lib' and do this basic process of compiling with cmake as I've described above. My system already has the 'libfreetype-dev'.

I don't know how it appears but, that is it.

Thanks for your attention eXpl0it3r.

4
Graphics / Re: Linker error with libfreetype
« on: March 11, 2023, 02:56:47 pm »
How did you get freetype? It looks like a static library, did you build it yourself?

I've downloaded it at: https://www.sfml-dev.org/download/sfml/2.5.1/

This is the stable version, scroll down it says: All | source code

1. I create a folder in the root dir called: DEBUG
2. I enter that folder with the terminal.
3. Then call: cmake -DCMAKE_BUILD_TYPE=Debug ..
4. Then: make

Where I get those message errors when it tries to compile the sfml-graphics-d module. In the source code there is a folder called 'extlibs' but I think is for OS Windows, maybe somehow it compiles some static libraries from that? or uses it!? Because previously I've tried to build statically and it works, then I installed with 'make install'.

5
Graphics / Linker error with libfreetype [SOLVED]
« on: March 10, 2023, 08:35:58 pm »
I'm having some trouble when trying to compile the source code using cmake. I'm on Unbuntu 22.04 amd64, and when it tries to link the libsfml-graphics.so I get this error message:

Consolidate compiler generated dependencies of target sfml-system
[ 16%] Built target sfml-system
Consolidate compiler generated dependencies of target sfml-window
[ 41%] Built target sfml-window
Consolidate compiler generated dependencies of target sfml-network
[ 51%] Built target sfml-network
Consolidate compiler generated dependencies of target sfml-graphics

[ 52%] Linking CXX shared library ../../../lib/libsfml-graphics-d.so
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftstroke.c.o): warning: relocation against `ft_outline_glyph_class' in read-only section `.text'
/usr/bin/ld: /usr/local/lib/libfreetype.a(ftglyph.c.o): relocation R_X86_64_PC32 against symbol `ft_bitmap_glyph_class' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/build.make:584: lib/libsfml-graphics-d.so.2.5.1] Error 1
make[1]: *** [CMakeFiles/Makefile2:264: src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

As you can see the other modules build fine.

Pages: [1]
anything