I had tried to build GWorkspace with PDFKit at MSYS2/MINGW32 but failed.
checking for PDFKit... no
configure: The PDFKit framework can't be found.
configure: The pdf viewer will not be built.
configure: creating ./config.status
Googling says "You can either instruct the linker to link the libraries even if the symbols are not encountered using
-Wl,--no-as-needed
linker option as
gcc `gnustep-config --objc-flags` -Wl,--no-as-needed -lgnustep-base h.m -o hello
Or better yet just move the source to the beginning of the compilation command as
gcc h.m `gnustep-config --objc-flags` -lgnustep-base -o hello"
--------------------------------------
gcc conftest.c -o conftest.exe -xobjective-c -MMD -MP -DGNUSTEP
-DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1
-DGNUSTEP_BASE_LIBRARY=1 -DGNUSTEP_WITH_DLL -fno-strict-aliasing
-fexceptions -fobjc-exceptions -D_NATIVE_OBJC_EXCEPTIONS
-fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -g -O2
-fgnu-runtime -fconstant-string-class=NSConstantString -I.
-I/mingw32/GNUstep/Local/Library/Headers
-I/mingw32/GNUstep/System/Library/Headers -Wl,--enable-auto-import
-shared-libgcc -fexceptions -fgnu-runtime
-L/home/Nil/GNUstep/Library/Libraries
-L/mingw32/GNUstep/Local/Library/Libraries
-L/mingw32/GNUstep/System/Library/Libraries -lgnustep-gui -lgnustep-base
-lobjc -lws2_32 -ladvapi32 -lcomctl32 -luser32 -lcomdlg32 -lmpr
-lnetapi32 -lm -I. -lPDFKit >&5
makes too many compile errors(so omitted)
-----------------------------------------
exchanging "conftest.c" into "conftest.m" makes no error.
configure script may need changes. Does any suggestion?
(PS) Building PDFKit needs 'make LDFLAGS="-lgdi32"' at MSYS2/MINGW32.
Building libobjc2 needs "-lpthread" CMakeCache.txt at MSYS2/clang.