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

Could u tell me the version of your clang? #6

Open
4va1anch3 opened this issue Apr 13, 2016 · 4 comments
Open

Could u tell me the version of your clang? #6

4va1anch3 opened this issue Apr 13, 2016 · 4 comments

Comments

@4va1anch3
Copy link

when i do 'clang++ main.cpp -std=c++1z -Wno-gnu-string-literal-operator-template -D COMMAND -o tetris ; ./tetris' , there are many compile errors. And I do it in Ubuntu 14.04, clang 3.8.0. Is it the problem of my compiler or os?

@mattbierner
Copy link
Owner

Can you please post up the set of errors so that I have an idea of what may be going wrong.

The compiler version looks fine and there should not be anything too platform specific in the code.

@4va1anch3
Copy link
Author

The set of errors and compiler information are in the attached *.txt.
compile error.txt

@mattbierner
Copy link
Owner

I can't repo the issue, but from the first error on in the file:

no member named 'gets' in the global namespace
using ::gets;

this report looks relevant (link to bug)

Also, try targeting -std=c++1y / -std=c++14 instead too, which may be more stable for that version of GCC. I don't recall using anything 1z specific, besides playing around with fold expressions.

Does an main.cpp file with just:

#include <iostream>
#include <fstream>

int main(int argc, const char* argv[]) { return 0; }

compile with the same command line arguments?

@4va1anch3
Copy link
Author

I do it as you suggested. Now I know why it had compile errors. It seems clang searched for necessary header files and used header files under gcc. However, the version of gcc is too low in my pc. When I use g++ 5.3 as my compiler, there is no error. Thanks a lot for your help! BTW: do u know how to set the path of gcc for clang, because I prefer clang as my compiler but I do not find a way to do it.

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