So they are in direct.h ... they used to be found in io.h, as you would get
using MSVC, I presume.

 So why doesn't io.h #include <direct.h> .. should it?

hmm .. direc.h and io.h should have been included under the following from
filefn.h, which feeds filefn.cpp:

#if defined(__WINDOWS__) && !defined(__WXMICROWIN__)
#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) &&
!defined(__SALFORDC__) && !defined(__WXWINCE__) && !defined(__CYGWIN__)
    #include <direct.h>
    #include <dos.h>
    #include <io.h>
#endif // __WINDOWS__
#endif // native Win compiler


On Wed, Oct 29, 2014 at 10:23 PM, Yaron Keren <yaron.ke...@gmail.com> wrote:

> 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
>
>
------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to