discuss-gnustep
[Top][All Lists]
Advanced

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

Re: [Q] PDFKit detection of GWorkspace Inspector configure at MSYS2/MING


From: Wolfgang Lux
Subject: Re: [Q] PDFKit detection of GWorkspace Inspector configure at MSYS2/MINGW32
Date: Thu, 10 Mar 2016 09:42:42 +0100

> Am 09.03.2016 um 23:23 schrieb Riccardo Mottola <address@hidden>:
> 
> 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 ?

You could temporarily switch the language around the AC_LINK_IFELSE test in 
aclocal.m4 using AC_LANG_PUSH([Objective C]) before the AC_LINK_IFELSE test and 
AC_LANG_POP([Objective C]). However, as this will also switch the test to using 
the variables OBJC and OBJCFLAGS instead of CC and CFLAGS, respectively, you 
might not want to do this.

> 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.

Regarding the link order issue, which seems to be the real problem here, it 
would help to just include `gnustep-config --gui-libs` in the LIBS definition 
rather than in LDFLAGS. I've just committed this change.

Wolfgang



reply via email to

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