Updated wxMkDir call to include mode_t parameter for directory creation, which fixes error:
src/common/filefn.cpp:663:17: error: too few arguments to function ‘int wxMkDir(const wxString&, mode_t)’
https://github.com/wxWidgets/wxWidgets/pull/26042
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
On which platform and compiler are you seeing that compile error? wxMkDir() is declared in the header with a default argument for mode_t, so it shouldn't be needed:
https://github.com/wxWidgets/wxWidgets/blob/master/include/wx/filefn.h#L448
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
This is a Cygwin-only issue, apparently: for some reason mode doesn't have a default value there. The right fix is almost certainly to add it to the declaration instead of this hack.
@Proshanto-1234 Can you check that this diff fixes the problem too?
diff --git a/include/wx/filefn.h b/include/wx/filefn.h index 0abd2abe0c..e79c8f67c5 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -381,7 +381,7 @@ inline int wxRmDir(const wxString& path) inline int wxMkDir(const wxString& path, mode_t WXUNUSED(mode) = 0) { return wxCRT_MkDir(path.fn_str()); } #else -inline int wxMkDir(const wxString& path, mode_t mode) +inline int wxMkDir(const wxString& path, mode_t mode = 0777) { return wxCRT_MkDir(path.fn_str(), mode); } #endif
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@swt2c the issue is in Cygwin on Windows. The generator is Unix Generator, and the build system is CMake, before running make -j$(nproc)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz inline int wxMkDir(const wxString& path, mode_t mode = 0777) works! Here is it:
[ 36%] Building CXX object libs/base/CMakeFiles/wxbase.dir/////src/common/filefn.cpp.obj
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()