This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Unable to set GCC 8.1 in CMakeList.txt for Kdevelop

Tags: gcc, kdevelop gcc, kdevelop gcc, kdevelop
(comma "," separated)
User avatar
Bensuperpc
Registered Member
Posts
2
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 << __GNUC__ << std::endl;
    return 0;
}


Output this :
Code: Select all
4


Thank you in advance for your answers :) ,


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]