Reply to topic

Unable to set GCC 8.1 in CMakeList.txt for Kdevelop

Bensuperpc
Registered Member
Posts
1
Karma
0
Good Afternoon,
I have a problem with Kdevelop 5.2.1 under ubuntu 18.04.1, Kdevelop refuses to choose GCC 8.1, he chooses the default version 4.9.

I tried this in Cmake:
Code: Select all
set(CMAKE_C_COMPILER "gcc-8.1")
set(CMAKE_CXX_COMPILER "/usr/bin/g++-8")


and I tried this add g++ in C/C++ compiler option (usr/bin/g++-8 or usr/bin/gcc-8), but it disappears as soon as I close the option window and reopen it.
I remove GCC/G++ 4.9, I have error in Kdevelop and refuses GCC 8 or G++ 8 in /usr/bin/g++-8 or gcc-8.

I know the compiler revision with this code :

Code: Select all
#include <iostream>

int main(int argc, char **argv) {
    std::cout << __cplusplus << std::endl;
    return 0;
}


Output this :
Code: Select all
201402


Thank you in advance for your answers :) ,

Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], boospy007, claydoh, Exabot [Bot], Google [Bot], nshiell, Sogou [Bot], TG