help-libidn
[Top][All Lists]
Advanced

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

Re: Compilation under VS2008


From: xarx
Subject: Re: Compilation under VS2008
Date: Wed, 21 Jul 2010 16:01:06 +0200

Found what is wrong. Since version 1.13 the IDNAPI macro defines as __declspec(dllimport) instead of __declspec(dllexport). After defining the LIBIDN_BUILDING preprocessor definition, everything compiles correctly. However, the meaning of LIBIDN_BUILDING is explained nowhere; perhaps it indicates that the headers are used from Libidn itself, not from a dll client.

I suggest to add this define into "libidn.vcproj".

Thank you,
            Martin.


On Wed, 21 Jul 2010 14:50:48 +0200
"xarx" wrote:
> Hello,
>
> since version 1.13, I'm not able to build libidn in VS 2008. Version
>1.12 is the last one, where build succeeds. (I've downloaded and
>tested all versions from 1.12 to the current one 1.19).
>
> The files where the compilation fails are "profiles.c" and
>"stringprep.h". Each file that includes "stringprep.h" reports:
>
> 1>w:\libidn-1.13\lib\profiles.c(25) : warning C4273:
>'stringprep_profiles' : inconsistent dll linkage
> 1> w:\libidn-1.13\lib\stringprep.h(114) : see previous
>definition of 'stringprep_profiles'
>
> When compiling "profiles.c", I get also:
>
> 1>w:\libidn-1.13\lib\profiles.c(26) : error C2099: initializer is
>not a constant
> 1>w:\libidn-1.13\lib\profiles.c(27) : error C2099: initializer is
>not a constant
> 1>w:\libidn-1.13\lib\profiles.c(28) : error C2099: initializer is
>not a constant
> 1>w:\libidn-1.13\lib\profiles.c(29) : error C2099: initializer is
>not a constant
> 1>w:\libidn-1.13\lib\profiles.c(30) : error C2099: initializer is
>not a constant
> 1>w:\libidn-1.13\lib\profiles.c(31) : error C2099: initializer is
>not a constant
> ....... (more than 100 times)
>
> Is there an easy fix? At first sight, I see nothing wrong with the
>code, so it can be that some compiler compatibility flags need to be
>turned on, or something like that. In version 1.13, "stringprep.h"
>was substantially modified.
>
> Thank you,
> Martin.
>
>

reply via email to

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