Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build of sbasicg on MINGW64 #190

Open
ghost opened this issue Mar 28, 2023 · 4 comments
Open

Build of sbasicg on MINGW64 #190

ghost opened this issue Mar 28, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 28, 2023

After #165 was resolved, configuration was done but failed at linking:

g++  -g -O2 -fno-rtti -std=c++14   -o sbasicg.exe ../../lib/lodepng/lodepng.o ../../ui/graphics.o ../../ui/ansiwidget.o ../../ui/window.o ../../ui/screen.o ../../ui/system.o ../../ui/form.o ../../ui/inputs.o ../../ui/textedit.o ../../ui/image.o ../../ui/strlib.o ../../ui/audio.o main.o display.o runtime.o settings.o editor.o syswm.o -L../../../src/common -lsb_common  -lwsock32 -lws2_32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -Wl,-Map=output.map -LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lm -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid -ladvapi32 -lsetupapi -lshell32 -ldinput8 -lfreetype win.res
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x64ed): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6502): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6525): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6563): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x65a0): undefined reference to `png_set_read_fn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x65ad): undefined reference to `png_read_info'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x65ef): undefined reference to `png_get_IHDR'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6682): undefined reference to `png_set_expand_gray_1_2_4_to_8'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6695): undefined reference to `png_get_valid'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x66df): undefined reference to `png_set_interlace_handling'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x66f3): undefined reference to `png_set_filler'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6700): undefined reference to `png_read_update_info'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6742): undefined reference to `png_get_IHDR'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6783): undefined reference to `png_set_read_user_transform_fn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x684b): undefined reference to `png_read_image'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6858): undefined reference to `png_read_end'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68ad): undefined reference to `png_set_tRNS_to_alpha'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68b7): undefined reference to `png_set_gray_to_rgb'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68c1): undefined reference to `png_set_packing'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68cb): undefined reference to `png_set_strip_16'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68d8): undefined reference to `png_set_palette_to_rgb'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x68ec): undefined reference to `png_set_read_user_transform_fn'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x6921): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x69ba): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x69d8): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x8262): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x829a): 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: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0x82aa): undefined reference to `png_error'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_sfnt_sfnt.c.obj):(.text+0xfaae): undefined reference to `BrotliDecoderDecompress'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x2144): undefined reference to `hb_font_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x214d): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x220e): undefined reference to `hb_blob_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x58a0): undefined reference to `hb_font_get_face'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x58ed): undefined reference to `hb_ot_tags_from_script_and_language'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5968): undefined reference to `hb_set_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5990): undefined reference to `hb_ot_layout_collect_lookups'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5998): undefined reference to `hb_set_is_empty'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x59a5): undefined reference to `hb_set_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x59f3): undefined reference to `hb_ot_layout_lookup_collect_glyphs'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x59fe): undefined reference to `hb_set_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a07): undefined reference to `hb_set_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a29): undefined reference to `hb_ot_layout_collect_lookups'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a2e): undefined reference to `hb_set_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a7b): undefined reference to `hb_ot_layout_lookup_collect_glyphs'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5a86): undefined reference to `hb_set_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b3c): undefined reference to `hb_ot_layout_lookup_would_substitute'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b4f): undefined reference to `hb_set_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5b9d): undefined reference to `hb_set_subtract'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5bb7): undefined reference to `hb_set_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5bec): undefined reference to `hb_set_next'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5bf8): undefined reference to `hb_set_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5c00): undefined reference to `hb_set_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5c0a): undefined reference to `hb_set_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5c12): undefined reference to `hb_set_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e5e): undefined reference to `hb_face_create_for_tables'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e6c): undefined reference to `hb_face_set_index'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e78): undefined reference to `hb_face_set_upem'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e80): undefined reference to `hb_font_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e8b): undefined reference to `hb_face_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x5e94): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x6195): undefined reference to `hb_blob_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x61a3): undefined reference to `hb_face_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x61ae): undefined reference to `hb_blob_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x73e4): undefined reference to `hb_font_set_scale'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x741a): undefined reference to `hb_buffer_clear_contents'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7433): undefined reference to `hb_buffer_add_utf8'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x743b): undefined reference to `hb_buffer_guess_segment_properties'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7453): undefined reference to `hb_shape'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7468): undefined reference to `hb_buffer_clear_contents'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x747e): undefined reference to `hb_buffer_add_utf8'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7486): undefined reference to `hb_buffer_guess_segment_properties'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7497): undefined reference to `hb_shape'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x74a4): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x74b4): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x74c8): undefined reference to `hb_buffer_get_length'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7553): undefined reference to `hb_buffer_clear_contents'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x75e6): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x763d): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x770f): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x771d): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x773b): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x792b): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7b77): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7b85): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7e86): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7edd): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7faf): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7fbd): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7fdb): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8207): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8434): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x85d0): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x85de): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8f6b): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8fa8): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8fb6): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x8ff9): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9069): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x90c0): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x90ce): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x9109): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x923d): undefined reference to `hb_buffer_get_glyph_infos'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x924b): undefined reference to `hb_buffer_get_glyph_positions'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7371): undefined reference to `hb_buffer_create'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7384): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_autofit_autofit.c.obj):(.text+0x7b54): undefined reference to `hb_buffer_destroy'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x20f): undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x465): undefined reference to `inflateReset'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x4ec): undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x6dc): undefined reference to `inflateInit2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x822): undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x93d): undefined reference to `inflateInit2_'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x94e): undefined reference to `inflate'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x95d): undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_gzip_ftgzip.c.obj):(.text+0x9ba): undefined reference to `inflateEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x6c): undefined reference to `BZ2_bzDecompressEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x11d): undefined reference to `BZ2_bzDecompress'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x32a): undefined reference to `BZ2_bzDecompressEnd'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x380): undefined reference to `BZ2_bzDecompressInit'
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:/msys64/mingw64/lib\libfreetype.a(src_bzip2_ftbzip2.c.obj):(.text+0x612): undefined reference to `BZ2_bzDecompressInit'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [Makefile:501: sbasicg.exe] Error 1
make[2]: Leaving directory '/home/hgntn/SmallBASIC/src/platform/sdl'
make[1]: *** [Makefile:538: all-recursive] Error 1
make[1]: Leaving directory '/home/hgntn/SmallBASIC'
make: *** [Makefile:479: all] Error 2

I already have the packages mingw-w64-x86_64-libpng mingw-w64-x86_64-brotli mingw-w64-x86_64-harfbuzz mingw-w64-x86_64-zlib installed.

@chrisws
Copy link
Contributor

chrisws commented Mar 29, 2023

Looks like you might need to custom build freetype. Try this:

  1. DL the latest from https://download.savannah.gnu.org/releases/freetype/
  2. Unzip to a clean folder, then
    HOST=x86_64-w64-mingw32
    PREFIX=/home/user/mingw64
    CFLAGS="-std=gnu99" ./configure --host=${HOST} --prefix=${PREFIX} --without-zlib --without-png --without-harfbuzz
    make && make install

@ghost
Copy link
Author

ghost commented Mar 29, 2023

Looks like you might need to custom build freetype.

I don't think so. Look at the build command:

g++ -g -O2 -fno-rtti -std=c++14 -o sbasicg.exe ../../lib/lodepng/lodepng.o ../../ui/graphics.o ../../ui/ansiwidget.o ../../ui/window.o ../../ui/screen.o ../../ui/system.o ../../ui/form.o ../../ui/inputs.o ../../ui/textedit.o ../../ui/image.o ../../ui/strlib.o ../../ui/audio.o main.o display.o runtime.o settings.o editor.o syswm.o -L../../../src/common -lsb_common -lwsock32 -lws2_32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -Wl,-Map=output.map -LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lm -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid -ladvapi32 -lsetupapi -lshell32 -ldinput8 -lfreetype win.res

Do you see -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a is duplicated twice and the libraries that provide the needed symbols (libpng, brotli, harfbuzz, zlib,...) are not linked?

I think it's a bug of sdl2-config --static-libs. Here is the output of sdl2-config --static-libs on MINGW64:

-LC:/msys64/mingw64/lib -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lmingw32 -mwindows -lSDL2main C:/msys64/mingw64/lib/libSDL2.a -lm -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid -ladvapi32 -lsetupapi -lshell32 -ldinput8

I will report to MINGW64.

@ghost
Copy link
Author

ghost commented Mar 29, 2023

@chrisws Please improve your build script: msys2/MINGW-packages#16514 (comment)

@chrisws
Copy link
Contributor

chrisws commented Apr 2, 2023

Hi Ghost,

SmallBASIC uses freetype for the SDL and Android builds. But the usage doesn't require the libpng, harfbuzz or zlib libraries.

The SmallBASIC configure script assumes a custom compiled version of freetype using the arguments I descibed ealier:

CFLAGS="-std=gnu99" ./configure --host=${HOST} --prefix=${PREFIX} --without-zlib --without-png --without-harfbuzz

It looks like you are building against a version of freetype which was built to depend on these libraries, but then our configure script doesn't supply all the arguments this entails.

I think you'd have more success building a custom version of freetype as described. You could also try tweaking configure.ac to find a workable solution. I'd be happy to include it, assuming it doesn't break the regular build process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant