on a MacMini M1 (2020).
I am using a static build (configure --disable-shared)
The following code fails to open a file for writing.
Similar code to open a file for reading also fails.
I tried filename::Exists(). That fails too for a file that visibly exists.
Then I tried this code.
The code runs, nothing gets created.
I'm running this as an Admin, so permissions should not be an issue.
Code: Select all
#include "wx/wxprec.h"
#include "wx/wx.h"
#include "wx/ffile.h"
#include "wx/filename.h"
#include "wx/log.h"
class MyApp : public wxApp
{
public:
virtual bool OnInit() wxOVERRIDE;
virtual int OnExit() wxOVERRIDE { return 0; }
};
wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
if ( !wxApp::OnInit() )
return false;
wxFFile *file = new wxFFile();
unsigned char ucBuffer[22];
file->Open("test", "w");
file->Write( ucBuffer, 22 );
file->Close();
return true;
}