Re: [sigc] Compiling libsic++ as a DLL under Windows
- From: Martin Schulze <martin-ml hippogriff de>
- To: Arnaud Debaene <Arnaud Debaene metravib fr>
- Cc: libsigc-list gnome org
- Subject: Re: [sigc] Compiling libsic++ as a DLL under Windows
- Date: Wed, 4 Aug 2004 20:01:20 +0200
Am 04.08.2004 09:47:24 schrieb(en) Martin Schulze:
Am 03.08.2004 20:03:48 schrieb(en) Martin Schulze:
Hi!
James attached a patch solving these problems to the bugzilla bug
report. I've just committed to cvs. Please try whether it is working
for you and confirm! If further modifications of the project file
are necessary for your needs, please let us know.
I just remembered that I forgot to 'cvs add' the sigc++config.h file
so
it probably won't work out-of-the-box. Please stand by until tonight,
when I have access to cvs again ...
Done.
Martin
Regards,
Martin
Thanks!
Regards,
Martin
Am 29.07.2004 16:46:24 schrieb(en) Martin Schulze:
Hi Arnaud!
We would happily accept a patch against cvs. Please modify the
affected header files to include sigc++config.h.
Don't forget that most header files get generated from .m4 files in
the macros/ subdirectories; these are the files to modify.
sigc++config.h is also generated by the configure script, so please
add the #defines in sigc++config.h.in. We already need a patch that
provides (and makes the library use) a pregenerated sigc++config.h
in the MSVC project directory. Maybe you can also include this in
your patch.
Thanks!
Martin
Am 28.07.2004 11:34:07 schrieb(en) Arnaud Debaene:
I am trying to build a Win32 DLL from libsigc++ (see
http://lists.gnome.org/archives/libsigc-list/2004-July/msg00027.html
for
another message on the subject).
Among other things, I need to export some symbols from the DLL
using
the
__declspec(dllexport) Microsoft stuff. I have therefore defined a
SIC_API macro as suggested by James Lin.
The macro is used on several places:
connection.h :
l 39 : struct SIGC_API connection
trackable.h :
l 35 : struct SIGC_API trackable_callback
l 49 : struct SIGC_API signal_base : public trackable
l 89 : struct SIGC_API trackable
signal_base.h :
l 43 : struct SIGC_API signal_impl
l 139 : struct SIGC_API signal_exec
l 195 : struct SIGC_API signal_base : public trackable
adaptors\lambda\select.h :
l 335 : SIGC_API extern const lambda<internal::lambda_select1>
_1;
SIGC_API extern const lambda<internal::
lambda_select2>
_2;
SIGC_API extern const lambda<internal::
lambda_select3>
_3;
SIGC_API extern const lambda<internal::
lambda_select4>
_4;
SIGC_API extern const lambda<internal::
lambda_select5>
_5;
SIGC_API extern const lambda<internal::
lambda_select6>
_6;
SIGC_API extern const lambda<internal::
lambda_select7>
_7;
Functors\slot_base.h :
l 52 : struct SIGC_API slot_rep : public trackable
l 123 : struct SIGC_API slot_do_bind
l 141 : struct SIGC_API slot_do_unbind
l 206 : class SIGC_API slot_base : public functor_base
These are all the symbols I have identified that need to be
exported
from the DLL (basically, that is everything that is non template).
Now, the definition of the SIGC_API macro should be (according to
MS
standard way of doing things):
#ifndef SIGC_API
#ifdef _MSC_VER //Visual C++ only
#ifdef SIGC_DLL_EXPORT
#define SIGC_API __declspec(dllexport)
#else
#define SIGC_API __declspec(dllimport)
#endif
#else
#define SIGC_API
#endif
#endif
And SIGC_DLL_EXPORT should be defined in the Visual C++ project
file
used to build the DLL.
My question is: *WHERE* do I put the SIGC_MACRO definition?
sigc++_config.h sounds like a good candidate, but it isn't
#included
by
all the headers where this macro is used. In fact there doesn't
seems
to
be a common header included by everyone where I could put it. In
LibSigC++ 1.2, it was done in sigcconfig.h, but there does not
seems
to
be an equivalent in version 2.
Thanks for any idea.
PS: Once this problem solved, I could post an updated version of
the
Visual C++ project, if it may help.
_______________________________________________
libsigc-list mailing list
libsigc-list gnome org
http://mail.gnome.org/mailman/listinfo/libsigc-list
_______________________________________________
libsigc-list mailing list
libsigc-list gnome org
http://mail.gnome.org/mailman/listinfo/libsigc-list
_______________________________________________
libsigc-list mailing list
libsigc-list gnome org
http://mail.gnome.org/mailman/listinfo/libsigc-list
_______________________________________________
libsigc-list mailing list
libsigc-list gnome org
http://mail.gnome.org/mailman/listinfo/libsigc-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]