Re: [gtkmm] gtkmm-2.4 on MSVC



> Hello!
>
>> A few weeks ago I set out to reach a similar goal, but to my shame the
>> attempt petered. The reason was that fixing the linking problems
>> required a
>> dllimport/dllexport to be added in front of all class declarations (in
>> the
>> .hg and .ccg files to keep those changes), plus some other places,
>> namely
>> statically declared functions in .ccg files and all global objects,
>> which
>> should keep their 'extern' specifier in their declaration. Well, I tried
>> to
>> disentangle the m4 macro files but didn't have enough time to pursue.
>
> 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.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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