Re: [OT] Re: Opening a (cygwin-ised) DLL
- Original Message - Sent: 24 November 2008 18:56 Subject: Re: [OT] Re: Opening a (cygwin-ised) DLL Yaakov (Cygwin Ports) wrote: kernel32 is added by default because libcygwin.a depends on it. If you pass -mwindows to gcc during linking, then gdi32 is added as well. From: Brian Dessent It's not only kernel32: [...] This means that by default -luser32 -lkernel32 -ladvapi32 -lshell32 are added to every link, as well as -lgdi32 -lcomdlg32 if using -mwindows. Brian Thanks for the info guys. John -- 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/
[OT] Re: Opening a (cygwin-ised) DLL
- Original Message - From: John Emmas Sent: 24 November 2008 14:01 Subject: Re: Opening a (cygwin-ised) DLL Thanks Eric. That confirms my gut feeling but I just wanted to be sure :-) John Oops, I meant to ask another question (almost a variation on the same theme). Does Cygwin itself (or more correctly, its linker) link automatically to any of the standard Windows libs (such as kernel32.lib, user32.lib etc). The reason I'm asking is that my program doesn't link to them but a few days ago I accidentally used Sleep() in a program (note the capital 'S') instead of using sleep(). I thought that the capitalised version was Windows specific but Cygwin still linked the program okay. John -- 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/
Re: [OT] Re: Opening a (cygwin-ised) DLL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 John Emmas wrote: Oops, I meant to ask another question (almost a variation on the same theme). Does Cygwin itself (or more correctly, its linker) link automatically to any of the standard Windows libs (such as kernel32.lib, user32.lib etc). kernel32 is added by default because libcygwin.a depends on it. If you pass -mwindows to gcc during linking, then gdi32 is added as well. Yaakov -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (Cygwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkq44wACgkQpiWmPGlmQSP/mACfd9ErbZHtvxmqghR0VNsly0iA 2CIAoPjbQKlJk8vbuhUGsyznqpKPRJPN =lv0f -END PGP SIGNATURE- -- 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/
Re: [OT] Re: Opening a (cygwin-ised) DLL
Yaakov (Cygwin Ports) wrote: John Emmas wrote: Oops, I meant to ask another question (almost a variation on the same theme). Does Cygwin itself (or more correctly, its linker) link automatically to any of the standard Windows libs (such as kernel32.lib, user32.lib etc). kernel32 is added by default because libcygwin.a depends on it. If you pass -mwindows to gcc during linking, then gdi32 is added as well. It's not only kernel32: $ gcc -dumpspecs | egrep -A2 '\*lib:' *lib: %{pg:-lgmon} %{!mno-cygwin:-lcygwin} %{mno-cygwin:%{mthreads:-lmingwthrd} -lmingw32} %{mwindows:-lgdi32 -lcomdlg32} -luser32 -lkernel32 -ladvapi32 -lshell32 This means that by default -luser32 -lkernel32 -ladvapi32 -lshell32 are added to every link, as well as -lgdi32 -lcomdlg32 if using -mwindows. Brian -- 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/