discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] PDFKit detection of GWorkspace Inspector configure at MSYS2/MINGW32


From: Seong Gu Lee
Subject: [Q] PDFKit detection of GWorkspace Inspector configure at MSYS2/MINGW32
Date: Tue, 1 Mar 2016 16:05:16 +0900

Dear GNUsteppers,

I had tried to build GWorkspace with PDFKit at MSYS2/MINGW32 but failed.
(PDFKit is from gap svn)

From configure :
checking for PDFKit... no
configure: The PDFKit framework can't be found.
configure: The pdf viewer will not be built.
configure: creating ./config.status

From config.log:
configure:3552: checking for PDFKit
configure:3568: gcc -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/home/Nil/GNUstep/Library/Headers -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. conftest.c  -lPDFKit >&5

D:\msys64\tmp\ccFCMPS5.o: In function `main':
D:\msys64\home\Nil\gnustep\modules\usr-apps\gworkspace\Inspector/conftest.c:31: undefined reference to `objc_get_class'
D:\msys64\home\Nil\gnustep\modules\usr-apps\gworkspace\Inspector/conftest.c:31: undefined reference to `objc_msg_lookup'
D:\msys64\tmp\ccFCMPS5.o: In function `_objc_gnu_init':
D:\msys64\home\Nil\gnustep\modules\usr-apps\gworkspace\Inspector/conftest.c:34: undefined reference to `__objc_exec_class'
collect2.exe: error: ld returned 1 exit 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]