Topic: 请教为何Eclipse编辑C++程序时代码提示功能无法使用?

  Print this page

1.请教为何Eclipse编辑C++程序时代码提示功能无法使用? Copy to clipboard
Posted by: Scotty
Posted on: 2004-07-12 15:53

  C++开发环境为使用Eclispe 3.0 + CDT 2.0 + MinGW 3.0.1,当编辑C++程序时,使用了C++的头文件,如#include <iostream>后,代码提示及自动完成功能就无法使用了。
  在把MinGW 3.0.1改为Cygwin后情况一样。
  但如果只使用C语言的头文件,如#include <stdio.h>或#include <cstdio>,则代码提示及自动完成功能可以正常使用。
  不知大家在使用Eclipse开发C++程序时是否有这种情况?如何解决?
  谢谢!

2.Re:请教为何Eclipse编辑C++程序时代码提示功能无法使用? [Re: Scotty] Copy to clipboard
Posted by: Scotty
Posted on: 2004-07-15 08:52

这个问题我已在eclipse.tools.cdt新闻组得到了解答:

Subject: Re: Why don't use code assist?
From: jcamelon@ca.ibm.com (johnc)
Newsgroups: eclipse.tools.cdt
Organization: EclipseCorner
Date: Jul 14 2004 10:08:27
References: 1

<iostream> is a complicated header file, and causes content assist to time
out.

We are attempting to address this issue in the upcoming service release.

JohnC

"Scott Woo" <wuhb@msn.com> wrote in message news:ccub9p$ikc$1@eclipse.org...
> I edit C++ program with Eclipse 3.0 + CDT 2.0 + MinGW 3.0.1.
>
> If I use C++ header file, example: #include <iostream>. I will can't use
> code assist.
>
> If I don't use C++ header file, just use C header file, example: #include
> <cstdio>. Code assist is OK.
>
> Why? Please help me, thanks.
>

3.Re:请教为何Eclipse编辑C++程序时代码提示功能无法使用? [Re: Scotty] Copy to clipboard
Posted by: Scotty
Posted on: 2004-07-15 10:09

  经过测试,在Eclipse中,把Window -> Preferences -> C/C++ -> Editor -> Content Assist -> Content Assist parsing timeout (ms)中的值由缺省的3000改为10000或更大的数值,代码提示的问题就能解决了,不过在引入了C++的头文件后代码提示等待时间会比较长,在写起代码时很影响速度。

4.Re:请教为何Eclipse编辑C++程序时代码提示功能无法使用? [Re: Scotty] Copy to clipboard
Posted by: davidself
Posted on: 2004-07-15 10:31

多谢,虽然和java无关,不过我对CDT很有兴趣。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923