WINVER and _WIN32_WINNT are not defined in Visual Studio either
automatically, you have to define those yourself. It has an impact on what
platforms are supported in your compiled binaries.
What if the Lua module is using something unsupported on a person's machine
(Ex: RegDeleteTree) - when a person on XP tries to use Luarocks, they will
get an unsightly compiler error and see that "oh, RegDeleteTree is
undefined... the package is horribly broken".. on the other hand, if you
force define the minimum version, it'll compile fine, but at runtime will
die horribly.
The ideal situation would be for there to be some sort of information made
available to the compiled C code (ex: TARGET_WINVER, TARGET__WIN32_WINNT,
...) that way the C code could do something like:
#if TARGET_WINVER < DESIRED_WINVER
#error The compilation target is too old to support this module, ....
#else
#define _WINVER DESIRED_WINVER
#endif
On Thu, Aug 22, 2013 at 10:50 AM, Hisham <h...@hisham.hm> wrote:
> On 22 August 2013 07:27, Alexey Melnichuk <mi...@newmail.ru> wrote:
> > When i compile some module i need to define Windows version(`WINVER` and
> > `_WIN32_WINNT` macro). MinGW does not define this macro at all. I think
> we
> > should define this macros in luarocks config.
>
> What do you propose exactly? I'm not aware of the side effects of
> doing that, so I'd like to hear the opinion on this topic from those
> with knowledge about compiling on Windows. Please chime in. :)
>
> -- Hisham
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Luarocks-developers mailing list
> Luarocks-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/luarocks-developers
>
--
Thomas Harning Jr. (http://about.me/harningt)
------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers