Hi Seong, Seong Gu Lee wrote: > 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.
is there a way to tell configure that the output should be .m instead of .c ? I believe this test is done in a macro and the output file auto-generated. Files with obj-c content should be indeed called .m, apparently it helps the compiler to select the correct mode. I'd gladly improve that. Riccardo _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
