View Single Post
Old 02-02-2019, 12:33 PM   #395
Aries1985
Human being with feelings
 
Join Date: Jul 2011
Posts: 49
Default GetOpenFileName()

This might be Swell question - what to include in C++ file to be able to use GetOpenFileName() function on Mac?

Grepping through Reaper SDK shows that it is defined in
Code:
reaper_extension_sdk/WDL/swell/windows.h
In my code, there are following includes among others:

Code:
#ifndef _WIN32

#include "../resource.h"
#include "../../WDL/swell/swell-dlggen.h"
#include "../res.rc_mac_dlg"
#include "../../WDL/swell/swell-menugen.h"
#include "../../WDL/swell/swell.h"
#include "../../WDL/swell/windows.h"
#include "../res.rc_mac_menu"

#endif
When compiling, following parameters are used:
Code:
-IWDL -IWDL/WDL -DSWELL_PROVIDED_BY_APP
However, there is still compilation error:
Code:
moxf/csurf_moxf.cpp:463:18: error: use of undeclared identifier 'GetOpenFileName'
                if (GetOpenFileName(&l))
                    ^
When omitting this function call, everything compiles and control surface configuration dialog shows without problems in REAPER.

Do you know what could be the problem?
Aries1985 is offline   Reply With Quote