|
From: | Howard Chu |
Subject: | Re: windows static archive, missing symbols |
Date: | Fri, 19 Jan 2007 23:29:02 -0800 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20070113 Netscape/7.2 (ax) Firefox/1.5 SeaMonkey/1.5a |
Brian Dessent wrote:
That's false. It's just an address relocation, performed by the runtime linker. Writing code that requires XXX_STATIC macros is nothing but ignorant, and hasn't been necessary for at least 5 years.Bob Rossi wrote:So, the correct way is to tell the author to remove the declspec's alltogether from the header file? That will work for both dynamic and static setup?No, it's not the right way. The right way is to add -DPCRE_STATIC to the CPPFLAGS. When linking against a DLL without __declspec(dllimport), it will still work but it's suboptimal as there will be an extra jump instruction through the function stub (and possibly an extra relocation to resolve, I don't remember.) This means the binary is larger and slower. Although the extent of this is debatable, you don't want to do that if you can avoid it, which you can by just using -DPCRE_STATIC, which is how it was designed to work.
http://www.cygwin.com/ml/cygwin/2002-01/msg00236.html -- -- Howard Chu Chief Architect, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc OpenLDAP Core Team http://www.openldap.org/project/
[Prev in Thread] | Current Thread | [Next in Thread] |