grrrr/py

Building from source for Max 7 - compile tweaks

Opened this issue · 0 comments

thely commented

I'm working on a Max 7 patch that I hope to use [py] in. After building from source the first time, I encountered the following:

source/pybase.cpp:490:16: error: no matching function for call to 'locatefile_extended'
    bool ok = !locatefile_extended(smod,&path,&type,&type,0);
               ^~~~~~~~~~~~~~~~~~~
/Users/Shared/Max 7/Packages/max-sdk/source/c74support/max-includes/ext_path.h:310:7: note: 
      candidate function not viable: no known conversion from 'long *' to 't_fourcc *'
      (aka 'unsigned int *') for 3rd argument
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_f...
      ^
source/pybase.cpp:500:15: error: no matching function for call to 'locatefile_extended'
        ok = !locatefile_extended(smod,&path,&type,&type,1);
              ^~~~~~~~~~~~~~~~~~~
/Users/Shared/Max 7/Packages/max-sdk/source/c74support/max-includes/ext_path.h:310:7: note: 
      candidate function not viable: no known conversion from 'long *' to 't_fourcc *'
      (aka 'unsigned int *') for 3rd argument
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_f...
      ^

One quick change and it compiled. Suggested addendum to the Max SDK tweaks section:

In the Max 7 SDK change the file 
source\c74support\max-includes\ext_path.h, line 310

from
short locatefile_extended(char *name, short *outvol, t_fourcc *outtype, C74_CONST t_fourcc *filetypelist, short numtypes);

to
short locatefile_extended(char *name, short *outvol, long *outtype, C74_CONST long *filetypelist, short numtypes);

Running Max 7.2.1, Mac OSX 10.9.5