libtool
[Top][All Lists]
Advanced

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

Re: windows static archive, missing symbols


From: Bob Rossi
Subject: Re: windows static archive, missing symbols
Date: Sat, 20 Jan 2007 00:42:36 -0500
User-agent: Mutt/1.5.12-2006-07-14

On Fri, Jan 19, 2007 at 06:30:19PM -0800, Howard Chu wrote:
> The next question is, why is it looking for an import symbol instead of 
> using the real symbol. The answer to that must lie in your header files; 
> they probably declare the function to be a DLL export, which causes the 
> compiler to generate references to an import symbol. Have a look at your 
> header files. Remove any DLL declspec's on any function declarations you 
> find there; modern linkers don't need them. I.e., the GNU linker is 
> smart enough to use an import symbol in place of a reference to a real 
> symbol. Apparently it won't do the opposite.

Yes, there was this code in the header,
#    ifndef PCRE_STATIC
#      define PCRE_DATA_SCOPE extern __declspec(dllimport)
#    endif

so, I #defined PCRE_STATIC before including pcre.h. This allowed the
link to work.

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?

Thanks,
Bob Rossi




reply via email to

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