----- Original Message ----- From: "tuitfun" <[EMAIL PROTECTED]> To: "gnuwin32" <gnuwin32-users@lists.sourceforge.net> Sent: Wednesday, July 04, 2007 4:54 PM Subject: [GnuWin32-Users] Pcre static library
> Pcre package only has libpcre.dll.a (no libpcre.a). can i build a program > that > links statically to Pcre? i tried to compile pcredemo.c and it ran fine > with > dynamic linking. however, when i tried to compile statically with: You cannot create a static version of your program by using libpcre.dll.a. This library contains only references to the DLL and does not carry any compiled code. For myself, I cannot see why using the DLL should be avoided. MS-Windows overflows with DLL's, your program very probably links to many of these (msvcrt.dll, kernel32.dll, user32.dll, ntdll.dll, ...), so why shouldn't your project use another one? If you still want a static library, you can follow the steps at http://gnuwin32.sourceforge.net/compile.html, and use the "--enable-static --disable-shared" option to configure. You could also tweak the the sources from Gnuwin32 (in particular replacing any occurrence of -DBUILD_PCRE_DLL or -DBUILD_PCRECPP_DLL by -DSTATIC -D__STATIC__ -DPCRE_STATIC), but on the way to a usable static library, you would probably encounter several problems (which shouldn't be hard to solve if you have a reasonable amount of experience in Make, Autoconf and Automake). Kees Zeelenberg ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ GnuWin32-Users mailing list GnuWin32-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnuwin32-users