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

error: ‘access’ was not declared in this scope #10

Open
renato-grottesi opened this issue Nov 12, 2020 · 0 comments
Open

error: ‘access’ was not declared in this scope #10

renato-grottesi opened this issue Nov 12, 2020 · 0 comments

Comments

@renato-grottesi
Copy link

Hi,

I get a trivial error when compiling in Ubuntu 20.04:

source/sdlkit.cpp: In function ‘bool ioExists(const string&)’:
source/sdlkit.cpp:182:13: error: ‘access’ was not declared in this scope
  182 |     return (access(filename.c_str(), 0) == 0);
      |             ^~~~~~

The one line fix is:

diff --git a/sfxr/source/sdlkit.cpp b/sfxr/source/sdlkit.cpp
index 2d125b0..885799c 100644
--- a/sfxr/source/sdlkit.cpp
+++ b/sfxr/source/sdlkit.cpp
@@ -25,6 +25,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 
 void error (const char *file, unsigned int line, const char *msg)
 {

After that it works fine :-)
Thanks for the great application!

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