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

Pages: [1]
1
General / Re: Dynamic SFML doesn't link
« on: January 11, 2023, 04:55:19 pm »
I've added new CMake variables pointing to the indirect dependencies (zlib, bzip2, HarfBuzz, etc.,  but not to FreeType-without-HarfBuzz-hinting) to SFML configuration and set SFML_USE_SYSTEM_DEPS to true. Then rebuilt. Linker still reports about missing symbols from HarfBuzz, libpng, bzip2 ¿and gzip? used by FreeType, in both debug and release modes.
Сonfiguring dynamic release SFML with SFML_USE_SYSTEM_DEPS set to true hangs indefinitely, however that was so even before now.
What could be wrong with FreeType?

2
General / Re: Dynamic SFML doesn't link
« on: January 04, 2023, 06:08:11 pm »
Indeed. I was linking only SFML and FreeType.
So it seems that indirect dependencies, or dependencies of dependencies, must be linked too. I think I misunderstand something there. When I was building FreeType, I've configured it to use static libpng (also self-built). When I was building HarfBuzz, I've configured it to use static FreeType. And when I was building FreeType again, I've told it to use static HarfBuzz. And everywhere I've told everything to use static libraries, except for when building dynamic SFML (which did not link successfully anyway). Why must I still link the dependencies then? Why wasn't their code included into FreeType; isn't that the point of static libraries? Does the linker treat static libraries differently when linking a library vs an executable?
Adding HarfBuzz, HarfBuzz-free FreeType, libpng, Brotli, bzip2 and zlib did fix many errors, but there are still thirty-eight of them complaining about undefined references to HarfBuzz's objects in HarfBuzz's code and to Brotli's objects in Brotli's code. That is something even more strange.
But it's possible that these errors result from probably incorrectly built FreeType, so they are likely to fix when I rebuild FreeType correctly.
I still don't understand how linking a library with static dependencies works though.

3
General / Re: Dynamic SFML doesn't link
« on: January 04, 2023, 09:19:43 am »
Hmm. My Windows PATH variable points to C:\msys64\mingw64\bin, and MSYS2's documentation says that MINGW64 subsystem uses MSVCRT. I guess that means that I use MSVCRT and not UCRT.
And there is in fact another one problem: when shipping together in one project debug SFML binary and debug self-built FreeType binary, and the project uses fonts in some form, linker throws errors which seem to be identical to the output under “debug” in my initial post.

4
General / Dynamic SFML doesn't link
« on: January 02, 2023, 05:55:05 pm »
So dynamic SFML doesn't link, neither debug nor release, while static one does fine.
The errors for release mode:
Linking CXX shared library ..\..\..\lib\sfml-graphics-2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5e8b): undefined reference to `png_create_read_struct'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5ea0): undefined reference to `png_create_info_struct'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5ec3): undefined reference to `png_set_longjmp_fn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x5efe): undefined reference to `png_destroy_read_struct'
[...]
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(ftgzip.c.obj):ftgzip.c:(.text+0x8d9): undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(ftgzip.c.obj):ftgzip.c:(.text+0x8e8): undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/release/lib/libfreetype.a(ftgzip.c.obj):ftgzip.c:(.text+0x93a): undefined reference to `inflateEnd'
 
For debug mode:
Linking CXX shared library ..\..\..\lib\sfml-graphics-d-2.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/debug/lib/libfreetyped.a(sfnt.c.obj): in function `error_callback':
D:/C++/.libs/FreeType/freetype-2.12.1-source/src/sfnt/pngshim.c:199: undefined reference to `png_get_error_ptr'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1-source/src/sfnt/pngshim.c:206: undefined reference to `png_set_longjmp_fn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/debug/lib/libfreetyped.a(sfnt.c.obj): in function `read_data_from_FT_Stream':
D:/C++/.libs/FreeType/freetype-2.12.1-source/src/sfnt/pngshim.c:230: undefined reference to `png_get_io_ptr'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1-source/src/sfnt/pngshim.c:236: undefined reference to `png_get_error_ptr'
[...]
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/debug/lib/libfreetyped.a(ftgzip.c.obj): in function `ft_gzip_file_fill_output':
D:/C++/.libs/FreeType/freetype-2.12.1-source/src/gzip/ftgzip.c:454: undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1/mingw32-make/static/debug/lib/libfreetyped.a(ftgzip.c.obj): in function `FT_Gzip_Uncompress':
D:/C++/.libs/FreeType/freetype-2.12.1-source/src/gzip/ftgzip.c:765: undefined reference to `inflateInit2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1-source/src/gzip/ftgzip.c:770: undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1-source/src/gzip/ftgzip.c:773: undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: D:/C++/.libs/FreeType/freetype-2.12.1-source/src/gzip/ftgzip.c:781: undefined reference to `inflateEnd'
 
It happens only if FREETYPE_INCLUDE_DIR_freetype2, FREETYPE_INCLUDE_DIR_ft2build and FREETYPE_LIBRARY are pointing to my self-built FreeType instead of to the bundled one, which I believe is more right than to use pre-compiled binaries, which can bang out incompatibilities or some other unpleasant things at unexpected point, don't they. SFML_USE_SYSTEM_DEPS is set to false all the time, if that matters.

Pages: [1]
anything