[Gecode] Found problem with dynamic linking on Windows and gcc

Christian Schulte schulte at imit.kth.se
Wed May 19 10:00:31 CEST 2004


Denys, thanks: that looks interesting. But I seem to remember that I tried
to build shared libraries with the explicit import/export off. I'll try
again...

And boy I like to get rid of it...

Cheers
Christian

--
Christian Schulte, http://www.imit.kth.se/~schulte/ 

-----Original Message-----
From: Denys Duchier [mailto:duchier at ps.uni-sb.de] 
Sent: Tuesday, May 18, 2004 7:31 PM
To: schulte at imit.kth.se
Cc: Technical discussions about Gecode
Subject: Re: [Gecode] Found problem with dynamic linking on Windows and gcc


"Christian Schulte" <schulte at imit.kth.se> writes:

> The incredible slowdown is due to the fact that gcc wraps any access 
> to an exported memory location into a procedure call!

Have you jumped through all the weird dll hoops?  I see the following in the
gcc manual:

     The use of the `dllimport' attribute on functions is not necessary,
     but provides a small performance benefit by eliminating a thunk in
     the dll. The use of the `dllimport' attribute on imported
     variables was required on older versions of GNU ld, but can now be
     avoided by passing the `--enable-auto-import' switch to ld. As
     with functions, using the attribute for a variable eliminates a
     thunk in the dll.

>From what you're describing, it seems that you still have the thunk and
you'd like to get rid of it :-)

Cheers,

-- 
Dr. Denys Duchier - Équipe Calligramme - LORIA, Nancy, FRANCE
AIM: duchierdenys





More information about the gecode-users mailing list