-
Notifications
You must be signed in to change notification settings - Fork 248
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
Compile error - error: invalid use of ‘this’ at top level #750
Comments
I think gcc 8 can work, but you'll have to set the C++ version. Those gcc versions default to a C++ version that's too told for current libpqxx versions, but you can select a newer version. Try adding If you're using the |
I'm already using this flag. |
That's what I get
|
Built g++-9 from source package.
|
The error message "invalid use of 'this' at top level" is probably a bug in gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52869 I think the reason the error occurs when compiling by gcc 9 is that installed libpqxx is not compiled by gcc 9. |
|
Since And |
Right - it may be possible to build C++ by calling "gcc", since gcc was originally a wrapper for various compilers, but you'd need a bunch of extra options and the simple solution is to call "g++" instead. In addition to this, I don't think |
@nairary, did using |
Sorry for taking so long to respond, was busy. |
Trying to compile code with this lib on manjaro linux with g++ 8.5.0 and astra linux with g++ 8.6.0 have same error on both, can't use higher g++
The text was updated successfully, but these errors were encountered: