简体   繁体   English

Eclipse CDT缺少的功能

[英]Eclipse CDT missing features

We have a C++ project we want to enhance using Eclipse on Linux (CentOS 7). 我们有一个C ++项目,我们想在Linux (CentOS 7)上使用Eclipse进行增强。 We have one Linux VM with Eclipse and CDT (a C++ plug-in) installed. 我们有一个装有Eclipse和CDT (一个C ++插件)的Linux VM。 Using CMake , we generated make files for the project and brought it up in Eclipse (File → Import → General → Existing Projects into Workspace). 使用CMake ,我们为项目生成了make文件,并在Eclipse中将其启动(文件→导入→常规→现有项目到Workspace)。 From there we need to do some fixes to make it compile C++ 11 code. 从那里开始,我们需要做一些修复以使其编译C ++ 11代码。 We do this via the "Properties → C/C++ General → Preprocessor Include Paths, Macros etc." 我们通过“属性→C / C ++常规→预处理器包含路径,宏等”来执行此操作。 page. 页。 It all builds and works fine. 这一切都建立和正常工作。

We created new Linux VMs with the same version of Linux. 我们使用相同版本的Linux创建了新的Linux VM。 We installed Eclipse (Oxygen) and installed the CDT plug-in. 我们安装了Eclipse(Oxygen)并安装了CDT插件。 We followed all the same steps as above, except in these new VMs, there is no "C/C++ General → Preprocessor Include Paths, Macros etc." 我们遵循与上述所有相同的步骤,除了在这些新的VM中,没有“ C / C ++常规→预处理器包含路径,宏等”。 option in the Properties dialog. 属性对话框中的选项。 We can get the code to compile as C++ 11, but the IDE itself doesn't recognize C++ 11 and marks most of the code as errors. 我们可以将代码编译为C ++ 11,但是IDE本身无法识别C ++ 11,并且会将大多数代码标记为错误。 If we had the "Preprocessor Include Paths, Macros etc." 如果我们有“预处理器包含路径,宏等”。 page, we could makes the necessary changes, but for the life of us, we can't figure out why it doesn't show up in the new VMs. 页面上,我们可以进行必要的更改,但是对于我们一生来说,我们无法弄清为什么它不会出现在新的VM中。 Both Eclipse installs have the same plug-ins (one, namely, CDT). 两种Eclipse安装都具有相同的插件(一个即CDT)。

Is there something we're missing? 我们缺少什么吗? Is there another way to access the options that the missing page allows? 还有另一种方法来访问缺少的页面允许的选项吗?

UPDATE Perhaps some visual will help. 更新也许有些视觉效果会有所帮助。 Here is what the Properties page looks like when opened on the original Linux VM: 在原始Linux VM上打开后,“属性”页面如下所示:

在此处输入图片说明

Here is what the Properties page looks like when opened in the new VMs: 在新的VM中打开后,“属性”页面如下所示: 在此处输入图片说明

As you can see, in the second image, there is no "Preprocessor Include Paths, Macros, etc." 如您所见,在第二个图像中,没有“预处理程序包含路径,宏等”。 option underneath "C/C++ General". “ C / C ++常规”下面的选项。 That is the problem. 那就是问题所在。 Without that page, we can't do several things to the project we need to to get it to operate correctly. 没有该页面,我们就无法对项目进行几项操作,以使其正常运行。

I can't really be proud of our solution to this problem. 我为我们解决这个问题感到骄傲。 The version of Eclipse that works is Oxygen.1a Release ( 4.7.1a ). 可用的Eclipse版本是Oxygen.1a发行版( 4.7.1a )。 The "latest and greatest" release of Eclipse (at the time) was Oxygen.2 Release ( 4.7.2 ). Eclipse(当时)的“最新最大”发行版是Oxygen.2发行版( 4.7.2 )。 We downloaded and installed 4.7.1a and it worked. 我们下载并安装了4.7.1a,它可以正常工作。 There must be a defect in 4.7.2 that prevents it from correctly recognizing C++ 11 code. 4.7.2中必须存在一个缺陷,阻止它正确识别C ++ 11代码。

Oxygen.1a 4.7.1a imports the project perfectly and shows up all the options we need to make changes and get the application to compile and run correctly. Oxygen.1a 4.7.1a完美地导入了项目,并显示了我们进行更改并使应用程序正确编译和运行所需的所有选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM