Closed aandrejevas closed 1 year ago
Hello, right now this function shown in the picture above does not compile on Windows. An implementation should be provided that would compile on Windows. This function (ImFileExist) is defined in file imgui_te_utils.cpp.
Please be reasonable and explain what doesn’t compile for you and provide details and context and compiler info, because clearly it compiles for us seeing we are building the test engine everyday.
Yes, sorry, I made many assumptions. I just saw the function stat being used and I instantly thought that this was an implementation not for Windows. Now I know that Microsoft has implemented many POSIX functions as extensions also.
The minimal demo app compiles and runs fine using Visual Studio.
I am trying to compile my app with gcc. These are the errors I get (the command in the picture is not the one I actually use):
This is the info about the compiler I use:
So now I think that something with the includes in the file imgui_te_utils.cpp might be wrong. I added the includes that I read in a microsoft website are required by the stat function. After that (and some other unrelated problem fixes) everything compiled and I was able to run my app. These are my changes:
Thanks a lot for investigating! Will push fix asap.
I have pushed 054b8a3 with what I believe is the slightly more correct fix, which is to test for #ifdef _MSC_VER
, it is a least consistent with the same tests we use in variety of imgui backends.
Thanks again!