Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors building on macOS #8

Open
ancestral opened this issue Nov 9, 2023 · 0 comments
Open

Errors building on macOS #8

ancestral opened this issue Nov 9, 2023 · 0 comments

Comments

@ancestral
Copy link

ancestral commented Nov 9, 2023

Several errors reported when making on macOS, Sonoma 14.1 with Developer Tools already installed.

nwnnsscomp.cpp:1817:30: error: no matching function for call to 'Compile'
        noError = noError && Compile (pauchData, ulSize, pszInFile, pszOutFile);
                             ^~~~~~~
nwnnsscomp.cpp:1563:6: note: candidate function not viable: requires 5 arguments, but 4 were provided
bool Compile (unsigned char *pauchData, UINT32 ulSize, 
     ^
nwnnsscomp.cpp:2378:26: error: variable has incomplete type 'struct _stat'
            struct _stat buf;
                         ^
nwnnsscomp.cpp:2378:20: note: forward declaration of '_stat'
            struct _stat buf;
                   ^
nwnnsscomp.cpp:2379:17: error: no viable conversion from '_stat' to 'int'
            int result = _stat(papszInFiles[i], &buf);
                ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
83 warnings and 3 errors generated.
make[2]: *** [nwnnsscomp.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

It seems that nwnnscomp.cpp:1817, adding bDebug as the last argument to the Compile function resolves that issue.

The other errors at lines 2378-2379 I didn’t know how to fix; I’m not much of a C++ programmer. Something to do with not having the struct previously defined in a header somewhere, maybe? So I just commented them out, and set int result = -1; which seemed to placate the make script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant