开发者

Eclipse CDT toolchain question

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


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.


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜