correct error without preprocess

This commit is contained in:
sonoro1234
2018-06-26 11:27:43 +02:00
parent 73a6da9451
commit d2304cdab9
3 changed files with 3711 additions and 5 deletions

2019
cimgui.cpp Normal file

File diff suppressed because it is too large Load Diff

1686
cimgui.h Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -70,7 +70,7 @@ local function filelines(file)
-- skip -- skip
elseif #iflevels == 0 then elseif #iflevels == 0 then
-- drop IMGUI_APIX -- drop IMGUI_APIX
line = line:gsub("IMGUI_APIX","") line = line:gsub("IMGUI_IMPL_API","")
-- drop IMGUI_API -- drop IMGUI_API
line = line:gsub("IMGUI_API","") line = line:gsub("IMGUI_API","")
return line return line
@@ -837,13 +837,13 @@ print("USEGCC",USEGCC)
local pipe,err local pipe,err
if USEGCC then if USEGCC then
pipe,err = io.popen([[gcc -E -C -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ../../imgui/imgui.h]],"r") pipe,err = io.popen([[gcc -E -C -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS -DIMGUI_API="" -DIMGUI_IMPL_API="" ../imgui/imgui.h]],"r")
if not pipe then if not pipe then
error("could not execute gcc "..err) error("could not execute gcc "..err)
end end
else else
pipe,err = io.open("../../imgui/imgui.h","r") pipe,err = io.open("../imgui/imgui.h","r")
if not pipe then if not pipe then
error("could not execute gcc "..err) error("could not execute gcc "..err)
end end
@@ -897,7 +897,8 @@ save_data("./cimgui.cpp",hstrfile)
save_data("./definitions.lua",serializeTable("defs",FP.defsT).."\nreturn defs") save_data("./definitions.lua",serializeTable("defs",FP.defsT).."\nreturn defs")
----------save struct and enums lua table in structs_and_enums.lua for using in bindings ----------save struct and enums lua table in structs_and_enums.lua for using in bindings
save_data("./structs_and_enums.lua",serializeTable("defs",gen_structs_and_enums_table(STP.lines)).."\nreturn defs") local structs_and_enums_table = gen_structs_and_enums_table(STP.lines)
save_data("./structs_and_enums.lua",serializeTable("defs",structs_and_enums_table).."\nreturn defs")
--=================================Now implementations --=================================Now implementations
@@ -911,7 +912,7 @@ if #implementations > 0 then
iSTP = struct_parser() iSTP = struct_parser()
for i,impl in ipairs(implementations) do for i,impl in ipairs(implementations) do
local source = [[../../imgui/examples/imgui_impl_]].. impl .. ".h " local source = [[../imgui/examples/imgui_impl_]].. impl .. ".h "
local locati = [[imgui_impl_]].. impl local locati = [[imgui_impl_]].. impl
local pipe,err local pipe,err
if USEGCC then if USEGCC then