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 on "‘off_t’ has not been declared" #13

Open
ngty opened this issue May 15, 2012 · 1 comment
Open

Error on "‘off_t’ has not been declared" #13

ngty opened this issue May 15, 2012 · 1 comment

Comments

@ngty
Copy link

ngty commented May 15, 2012

I'm curious if anyone has come across "‘off_t’ has not been declared" error, here's the dump i got:

g++ -g -D_FILE_OFFSET_BITS=64 -I. -I/usr/local/include -c local_gridfile.cpp
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:31:44: error: ‘off_t’ has not been declared
local_gridfile.h:32:36: error: ‘off_t’ has not been declared
local_gridfile.cpp:7:5: error: prototype for ‘int LocalGridFile::write(const char_, size_t, off_t)’ does not match any in class ‘LocalGridFile’
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:31:7: error: candidate is: int LocalGridFile::write(const char_, size_t, int)
local_gridfile.cpp:46:5: error: prototype for ‘int LocalGridFile::read(char_, size_t, off_t)’ does not match any in class ‘LocalGridFile’
In file included from local_gridfile.cpp:1:0:
local_gridfile.h:32:7: error: candidate is: int LocalGridFile::read(char_, size_t, int)
make: *** [local_gridfile.o] Error 1

I'm willing to fix it, but i'm at a lost.

@epitron
Copy link

epitron commented Jun 19, 2012

I fixed this problem by putting this line at the top of local_gridfile.h:

#include "sys/types.h"

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

2 participants