-
If i do something like this( i know ccinfo.is_winodws exists ) ##[[
if _WIN32 then
-- do some thing
end
]] is that looking for a variable named as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
When you use an
No, the Nelua's preprocessor does not make any define from the C preprocessor visible, but some from the C compiler are converted to values you can find in
I'm going to explain the current ways to do this below. 1. Using
|
Beta Was this translation helpful? Give feedback.
When you use an
if
statement in the preprocessor, it will look for a variable in the preprocessor's Lua environment, and_WIN32
is not defined there, unless you define it (by doing_WIN32 = true
before the if).No, the Nelua's preprocessor does not make any define from the C preprocessor visible, but some from the C compiler are converted to values you can find in
ccinfo
, so you can doif ccinfo.is_windows then
to check for Windows, under the hood this will be true in the C compiler also defines_WIN32
, and it's an effective way to detect windows.