我编译了最新版本的GCC。如何将CLion指向它的位置? [英] I compiled the latest version of GCC. How to point CLion to its location?

查看:784
本文介绍了我编译了最新版本的GCC。如何将CLion指向它的位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在目录中建立了最新版本的GCC。我如何指出CLion使用它?

I have built the latest version of GCC in a directory. How do I point CLion to use it?

推荐答案

在做了一些更多的研究之后,我意识到我需要配置的是CMake 。因为CLion有捆绑的CMake,所以你可以在CLion中配置它。

After doing some more research, I realized that what I need to configure is CMake. Since CLion has a bundled CMake, you can configure this inside CLion.

转到设置 - >构建,执行,部署 - > CMake。在CMake选项下,添加

Go to Settings -> Build, Execution, Deployment -> CMake. Under CMake options, add

-D CMAKE_CXX_COMPILER=...

并用 g ++ ... >。

and replace ... with the path to g++.

还有其他方法可以做到这一点,这可能会更好。我只是做了这个,它的工作,但如果你想挖掘一些,看到这里:

There are other ways to do this, which are probably better. I just did this and it worked, but if you want to dig in some more, see here:

https://cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F

这篇关于我编译了最新版本的GCC。如何将CLion指向它的位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆