[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small build changes for win32
From: |
Christian Ehrlicher |
Subject: |
Re: Small build changes for win32 |
Date: |
Fri, 31 Aug 2007 11:27:39 +0200 |
> Von: Simon Josefsson
> "Christian Ehrlicher" writes:
>
> > Hi,
> >
> > To properly build (and link against) libidn on win32, I had to change
> lib\stringprep.h.in . The problem is that exporting data on win32 is a mess
> :)
> >
> > See attached patch, it's against 1.0.
>
> Hi! Thanks for the patch. I am sorry for the slow reply, for some
> reason your e-mail didn't arrive at gmane.org where I read this list,
> but I found it in my mailman moderator queue and in the web archives.
>
> I'd prefer if LIBIDN_DATA_EXPORT evaluated to the empty string on
> non-win32 systems, rather than to 'extern const'. It seems in your
> approach you lose the 'extern' and 'const' specifiers. At least 'const'
> seems important. Would the following alternative approach still work on
> win32?
>
> // we need this little hack to export/import data properly
> #ifdef _WIN32
> # ifndef BUILD_LIBIDN_LIB
> # define LIBIDN_DATA_EXPORT __declspec(dllimport)
> # endif
> #endif
> ...
> extern const LIBIDN_DATA_EXPORT Stringprep_profiles
> stringprep_profiles[];
> ...
>
That's really the better solution (and works fine with msvc & mingw). Don't
know why I removed the const - imho gcc throwed a compiler error and then I
gave up :)
btw: Do you plan to add cmake buildsystem support? It would be nice for us
win32 users and would help us to automate packaging for
http://download.cegit.de/kde-windows/win32libs/zip/single/
Thx,
Christian Ehrlicher
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail