[Top][All Lists]

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

Re: DLLs and exported symbols...

From: Lars J. Aas
Subject: Re: DLLs and exported symbols...
Date: Thu, 23 Nov 2000 15:24:01 +0100
User-agent: Mutt/1.2.5i

On Thu, Nov 23, 2000 at 09:17:12AM -0500, Dale P. Smith wrote:
: Last place I worked we used gcc on all platforms. Except windows.  (I
: actully had a gcc win32 compiler running on Solaris, it worked great,
: but I couldn't generate win32 debug information.) We had to use macros
: like SCM_PUBLIC above. Dll code and code that calls the dll needed
: protypes to be declared differently.  Something like "export" for one
: and "import" for the other.  But my memory (gladly!) fades.

building DLL:      __declspec(dllexport)
linking with DLL:  __declspec(dllimport)

: Lars, what are you planning on exporting?  Just the init code?  All the
: gh_ interface?  Lot's of Guile C modules dip in beyond the gh_ interface
: when necessary.

I've currently exported everything.  It was more or less a

  for fil in *.h; do
    regsubst 's/extern/SCM_PUBLIC extern/' $fil

You could in fact pack "extern" into that define if it was desirable
to keep the headers more neat/readable, but I didn't really mind the
extra token.

Regarding the use of dllimport, I thought that was optional, but we
experienced some strange "access violation" crashes in some test
applications on some unrelated projects that disappeared when we
started using dllimport instead of nothing, so it seems to be a

  Lars J

reply via email to

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