Re: [gtkmm] gtkmm-2.4 on MSVC



Murray Cumming wrote:

Maybe as explanation for Murray: To build a shared library under MSVC
(dll) you need to specify the exported classes, variables and functions.
This is done with a special keyword (__declspec). You need to difference
between import and export, e.g. if you compile the dll you must write
__declspec(dllexport), if you use the dll you need to write
__declspec(dllimport).

Yes, I am familiar with this, and it's one reason that I dislike the
MSVC++ platform. As I say, the macros in libsigc++ are probably a good
starting point.

I had hoped that there might be a better way now. I seem to remember
something about being able to export everything automatically, but maybe
that was a cygwin or mingwin thing.
Right. Symbols are automatically exported with cygwin/mingw using the
--export-all-symbols ld option. That's what I use to create my mingw
binaries.

There is something similar for MSVC. It is a tool called win32def that
is used by (at least) the mico project. It is supposed to generate a def
file automatically for you. Search for "mico" and "win32def" in google
for details. I haven't tested it though.

Anyhow, I REALLY think either Frank or Rene should have a look at
win32def before starting to modify the source code and add these ugly
__declspec(dllimport/dllexport).

Hope it helps

Cedric




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