[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Building Subversion DLLs

From: Timothy Wall <twall_at_oculustech.com>
Date: 2005-12-07 14:24:26 CET

On Dec 7, 2005, at 7:08 AM, Ivan Zhakov wrote:

> I have discovered problems:
> http://msdn2.microsoft.com/en-us/library/619w14ds.aspx
> In a few words: On Windows exporting variable means exporting
> *pointer* to this variable and importing must dereference it.
> __declspec(dllexport)/__declspec(dllimport) makes this automatically.
> So I see several ways:
> 1. Use __declspec(dllimport) for variables only. Causes special define
> for *each* dll to separate dll building dll from importing.
> 2. Use __declspec(dllimport) everywhere on windows -- anyway causes
> usage special define per library and change signature of all API.
> 3. Never export/import data between libraries. I don't sure that this
> can be done.

We use a utility program to generate the list of exports and then
specify explicitly those things we do (or don't) want exported. This
file is passed to the linker (.def). We find this preferable to
littering header files with tons of declspec cruft.

Timothy Wall
Oculus Technologies Corporation

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 7 14:25:16 2005

This is an archived mail posted to the Subversion Dev mailing list.