Compilation error in XP-build
Closed this issue · 5 comments
Makopo commented
Setting SDK environment relative to C:\Program Files\Microsoft SDKs\Windows\v7.1\.
Targeting Windows XP x86 Release
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
win_flex lslmini.l
win_bison -d -v lslmini.y
cl.exe -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_MT -MT /TP /D_MBCS /DYY_NO_UNISTD_H /EHsc /w lslmini.tab.c
lslmini.tab.c
z:\lslint\lslmini.hh(160) : error C2146: syntax error : missing ';' before identifier 'get_value'
z:\lslint\lslmini.hh(160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\lslint\lslmini.hh(160) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\lslint\lslmini.hh(165) : error C2146: syntax error : missing ';' before identifier 'value'
z:\lslint\lslmini.hh(165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\lslint\lslmini.hh(165) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
z:\lslint\lslmini.hh(150) : error C2614: 'LLScriptIntegerConstant' : illegal member initialization: 'value' is not a base or member
z:\lslint\lslmini.hh(154) : error C2065: 'value' : undeclared identifier
z:\lslint\lslmini.hh(160) : error C2065: 'value' : undeclared identifier
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.exe"' : return code '0x2'
Stop.
Makopo commented
Using latest Win flex-bison, issue still persists.
Makopo commented
Sei-Lisa commented
I don't have an XP compile environment, but since builtins.cc is already using int32_t
without problems, and it just does #include <stdint.h>
, the fix is probably as simple as this:
diff --git a/lslmini.hh b/lslmini.hh
index 61ea3c5..3728b07 100644
--- a/lslmini.hh
+++ b/lslmini.hh
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h> // isprint()
+#include <stdint.h>
#include <cstdarg>
#include <set>
#include <string>
Can you please try and see if that suffices to fix the build?
Makopo commented
Thank you. I have tested above and confirmed all windows build worked well.