libui-ng: Building from source produces linker errors
I am on MacOS Montery, compiling with Clang-14. I am building shared
FAILED: meson-out/unit
cc -o meson-out/unit meson-out/unit.p/main.c.o meson-out/unit.p/init.c.o meson-out/unit.p/slider.c.o meson-out/unit.p/spinbox.c.o meson-out/unit.p/label.c.o meson-out/unit.p/button.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -mmacosx-version-min=10.8 -arch x86_64 -arch arm64 -Wl,-rpath,@loader_path/ meson-out/libui.A.dylib meson-out/libcmocka.a
ld: warning: ignoring file meson-out/libcmocka.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x23 0x31 0x2F 0x31 0x32 0x20 0x20 0x20 )
Undefined symbols for architecture x86_64:
"__assert_int_equal", referenced from:
_sliderValueDefaultMin0 in slider.c.o
_sliderValueDefaultMin1 in slider.c.o
_sliderSetValue in slider.c.o
_sliderSetValueOutOfRangeClampLow in slider.c.o
_sliderSetValueOutOfRangeClampHigh in slider.c.o
_sliderHasToolTipDefaultTrue in slider.c.o
_sliderSetHasToolTip in slider.c.o
...
"__assert_string_equal", referenced from:
_labelText in label.c.o
_labelTextEmptyString in label.c.o
_labelSetText in label.c.o
_labelSetTextEmptyString in label.c.o
_buttonTextDefault in button.c.o
_buttonSetText in button.c.o
"__assert_true", referenced from:
_unitTestsSetup in main.c.o
_unitTestSetup in main.c.o
_initUninit in init.c.o
_initUninitTwice in init.c.o
"__cmocka_run_group_tests", referenced from:
_initRunUnitTests in init.c.o
_sliderRunUnitTests in slider.c.o
_spinboxRunUnitTests in spinbox.c.o
_labelRunUnitTests in label.c.o
_buttonRunUnitTests in button.c.o
"__function_called", referenced from:
_onChangedNoCall in slider.c.o
_onChangedNoCall in spinbox.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[109/109] Linking target meson-out/cpp-multithread
ninja: build stopped: subcommand failed.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (8 by maintainers)
Ran examples, worked perfectly, thank you so much! I have wanted to use this library for months
Works perfectly, thank you so much