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

cld2/public/compact_lang_det.h should include .../encodings.h and stdio.h #43

Open
zackw opened this issue Oct 22, 2015 · 0 comments
Open

Comments

@zackw
Copy link

zackw commented Oct 22, 2015

cld2/public/compact_lang_det.h does not include all the headers it needs. The more obvious problem is failure to include stdio.h, which causes compilation to fail:

$ printf '#include <cld2/public/compact_lang_det.h>\nint foo;\n' | 
  g++ -fsyntax-only -fmessage-length=72 -x c++ -
In file included from <stdin>:1:0:
/usr/include/cld2/public/compact_lang_det.h:379:28: error: variable
   or field ‘DumpResultChunkVector’ declared void
 void DumpResultChunkVector(FILE* f, const char* src,
                            ^
/usr/include/cld2/public/compact_lang_det.h:379:28: error: ‘FILE’
    was not declared in this scope
/usr/include/cld2/public/compact_lang_det.h:379:34: error: ‘f’
    was not declared in this scope
 void DumpResultChunkVector(FILE* f, const char* src,
                                  ^
/usr/include/cld2/public/compact_lang_det.h:379:37: error: expected
   primary-expression before ‘const’
 void DumpResultChunkVector(FILE* f, const char* src,
                                     ^
/usr/include/cld2/public/compact_lang_det.h:380:45: error: expected
   primary-expression before ‘*’ token
                            ResultChunkVector* resultchunkvector);
                                             ^
/usr/include/cld2/public/compact_lang_det.h:380:47: error: ‘resultchunkvector’
    was not declared in this scope
                            ResultChunkVector* resultchunkvector);
                                               ^

The more subtle problem is that it doesn't include cld2/public/encodings.h either; this header is required in order to pass a valid encoding hint. (This would be minor if UNKNOWN_ENCODING had the value zero, but it doesn't.)

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