Hi,

These _functions are in <direct.h> same as Visual C++.
Maybe filefn.cpp does not #include it?

Yaron


2014-10-30 0:51 GMT+02:00 Greg Jung <gvj...@gmail.com>:

> Hi all,
>   Just as a matter of example, I run into the following error compiling
> wxMSW-2.8.12 using mingw/msys- gcc-4.8.2 (sjlj, win32):
>
> ../src/common/filefn.cpp: In function 'bool wxMkdir(const wxString&, int)':
> ../src/common/filefn.cpp:1253:30: error: '_mkdir' was not declared in this
> scope
>      if ( wxMkDir(dir.fn_str()) != 0 )
>                               ^
> ../src/common/filefn.cpp: In function 'bool wxRmdir(const wxString&, int)':
> ../src/common/filefn.cpp:1278:37: error: '_rmdir' was not declared in this
> scope
>      return (wxRmDir(OS_FILENAME(dir)) == 0);
>
> upon inspection, filefn.cpp is a real mess of preprocessor directives but
> it looks like mingw is missing something expected.
> I found on this page an interesting discussion of this very issue, exactly:
>
> https://forums.wxwidgets.org/viewtopic.php?t=29862 :
>
> Tue Oct 11, 2011 8:10 pm
> After more analysis and discussion on de wx-dev mailing list the cause of
> the problem is clear now:
>
> The C interface to msvcrt.dll supplied with the mingw-w64 compilers only
> defines the mkdir() and rmdir() functions for ANSI paths.
>
> The original MinGW defines mkdir(), _mkdir(), rmdir() and _rmdir() for
> ANSI paths. However, the versions without leading underscore are deprecated
> by Microsoft as of Visual C++ 2005.
>
> Mingw-w64 is using the deprecated versions, which is probably a bug /
> typo.
>
> I provided a patch for filefn.h with a workaround for this problem. Dee
> http://trac.wxwidgets.org/ticket/13556 for more information.
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to