On Sat, Jan 20, 2007 at 12:42:36AM -0500, Bob Rossi wrote:
> 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?

Sorry, it's late for me. I meant to say "static or shared (dll)".

Thanks,
Bob Rossi


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to