Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs Date: Thu, 13 Nov 2003 11:40:37 -0600 (CST) From: Brian Ford X-X-Sender: ford AT eos To: zze-BDE balg011 VAUCHER Laurent DvSI/SIReS/GRE cc: cygwin AT cygwin DOT com Subject: Re: Problems using WIN32 api In-Reply-To: <3418F3471F1CA4409901547349FFAE2E0CE2C5@ftrdmel2.rd.francetelecom.fr> Message-ID: References: <3418F3471F1CA4409901547349FFAE2E0CE2C5 AT ftrdmel2 DOT rd DOT francetelecom DOT fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I'll take a shot at a few of these I know. On Thu, 13 Nov 2003, zze-BDE balg011 VAUCHER Laurent DvSI/SIReS/GRE wrote: > I'm trying to understand how to build an application using > both Cygwin and (some) WIN32 APIs and I stumbled into a > problem using exactly whet the FAQ says (even if it says > it is not up to date). > > Example program : main.c > -------------------------- > #include > int main(int arc, char *argv[]) > { > BOOL sm; > /* The following function is in USER32.DLL */ > SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &sm, 0); > return 0; > } > > I tried compiling like the FAQ says I should : > > gcc -o main main.c -luser32 > WFM. Try gcc --verbose -o main main.c -luser32 and see what it is finding for -luser32. > All I get is "undefined reference to `SystemParametersInfoA AT 16`" > Since it seems that the 'interface' libs live in /usr/lib/w32api, > I tried to add -L/usr/lib/w32api, but the result is the same. > They should be searched automatically. > In last resort, I did this awful thing : > > gcc -o main main.c /usr/lib/w32api/libuser32.a > > which works !! But I'm still not satisfied with it, because > it does not work on another libtool based project (pango), > saying that I'm trying to include a static lib when building > a dynamic one. So libtool refuses to pass things like > /usr/lib/w32api/libuser32.a down to gcc and I need to > repair the gcc command line manually. > > And I've got some more questions : > - are the /usr/lib/w32api/libXXX.a real static libs (with code) > or only interface to the system DLLs? > Import libs. > - what's the difference with libXXX.dll.a? > Not sure. > - why is -luser32 or -lgdi32 not honored? > They should be. > - would it be difficult to create .la files for those > Win32 api, so that libtool would be nice with them? > Probably not, but this is more a topic for mingw-users AT lists DOT sf DOT net since they maintain w32api. > - is someone interested in a glib/gtk+ cygwin package > (not a native Win32 one)? > Don't know. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/