Eclipse CDT工具链问题

发布于 2024-08-17 12:28:50 字数 250 浏览 3 评论 0原文

我想使用 Eclipse CDT 作为编辑器。我在 Windows 机器上工作(因为它更强大),而工具链驻留在 Linux 机器上。现在,我打开 Eclipse,在正确的目录(源代码所在的 Linux 计算机上的磁盘)中创建空项目,然后将源代码(只需拖放)添加到项目中。我想要的只是能够进行交叉引用并对语法进行着色。现在我需要添加正确的包含目录并且......我只有带有预配置包含路径的“cygwin gcc”,我无法删除它。我想用包含路径、编译器等定义我自己的环境。 怎么做呢? 谢谢

I want to use Eclipse CDT as an editor. I work in windows machine (since it more poserfull compiuter), while the toolchain resides on the linux box. Now I open Eclipse, create empty project in the proper directory (disk on linux machine where the sources reside) and I add the sources (just drag-n-drop) into the project. All I want is ability to make crossreference and to colorize the syntax. Now I need to add the proper include directories and ... I have only the "cygwin gcc" with preconfigured include pathes, that I cannot remove. I want to define my own enviroment with include pathes, compiler etc.
How to do it?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

节枝 2024-08-24 12:28:50

您可以使用标准制作项目来破解您的方法。这将使 Eclipse CDT 使用您的 Makefile,您可以在其中定义正确的 CPPFLAGSCFLAGS、编译器等

。 Make Project 意味着您必须以某种方式保持 Eclipe 和 Makefile 内容之间的源目录和文件同步。

You might hack your way using a Standard Make Project. This will make Eclipse CDT use a Makefile of yours in which you can define the proper CPPFLAGS, CFLAGS, compiler etc.

Not that going the Standard Make Project means that you'll somehow have to keep the source directory and files in sync between Eclipe and the content of your Makefile.

意中人 2024-08-24 12:28:50

我在 Eclipse 的项目中使用 CDT Internal Builder 和 MS Visual C++ Toolchain。问题是编译器发誓:

无效参数'
候选人是:
std::basic_istream> &获取行(字符*,?)
std::basic_istream> &获取行(字符*,?,字符)
'

当我点击这样的东西时:

#include <fstream>
using namespace std;

int main()
{
fstream fin;
char buf[256];

fin.open("in.txt", fstream::in);
fin.getline(buf, 256); // !!!!!

return 0;
}

有什么问题吗?

I use CDT Internal Builder and MS Visual C++ Toolchain in my project in Eclipse. The problem is that the compiler swears:

Invalid arguments '
Candidates are:
std::basic_istream> & getline(char *, ?)
std::basic_istream> & getline(char *, ?, char)
'

when I'm tapping something like this:

#include <fstream>
using namespace std;

int main()
{
fstream fin;
char buf[256];

fin.open("in.txt", fstream::in);
fin.getline(buf, 256); // !!!!!

return 0;
}

What is the problem?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文