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

Add missing #include and namespace to nbla/cuda/version.hpp #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tosainu
Copy link

@Tosainu Tosainu commented Jul 18, 2020

This pull request fixes the compile errors when using nbla/cuda/version.hpp.

$ g++ --version
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cat main.cc
#include <iostream>
#include <nbla/cuda/version.hpp>

auto main() -> int {
  std::cout << nbla::nbla_ext_cuda_version() << std::endl;
}
$ g++ main.cc -lnnabla_cuda
In file included from main.cc:2:0:
/usr/local/include/nbla/cuda/version.hpp:18:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_version(void);
       ^~~~~~
       stdin
/usr/local/include/nbla/cuda/version.hpp:20:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_cuda_version(void);
       ^~~~~~
       stdin
/usr/local/include/nbla/cuda/version.hpp:21:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_cudnn_version(void);
       ^~~~~~
       stdin
/usr/local/include/nbla/cuda/version.hpp:23:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_author(void);
       ^~~~~~
       stdin
/usr/local/include/nbla/cuda/version.hpp:24:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_author_email(void);
       ^~~~~~
       stdin
/usr/local/include/nbla/cuda/version.hpp:25:7: error: 'string' does not name a type; did you mean 'stdin'?
 const string nbla_ext_cuda_build_number(void);
       ^~~~~~
       stdin
main.cc: In function 'int main()':
main.cc:5:16: error: 'nbla' has not been declared
   std::cout << nbla::nbla_ext_cuda_version() << std::endl;
                ^~~~

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

Successfully merging this pull request may close these issues.

1 participant