Eclipse CDT,cygwin和链接问题 [英] Eclipse CDT, cygwin and linking problems

查看:79
本文介绍了Eclipse CDT,cygwin和链接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经安装了Eclipse的CDT插件,我想在Cygwin下的C / C ++项目中使用它来工作

。它可以工作,实际上它编译并运行通常的helloworld c ++程序。现在,当我尝试添加外部库时,很难实现
。比如...... GTK。让我们来解释一下我的尝试。 (哦

好​​吧,我正在使用Eclipse Europa 3.3.1和CDT 4.0.1)。首先我只是

添加了cygwin的路径包括通过项目 - > properties-


> C / C ++ General-> ;路径和符号窗口。我添加了
下的包含



GNU C gtk-2.0的路径包含在cygwin / usr / include / gtk-2.0

文件夹中。没有效果。它说它找不到gtk / gtk.h。所以,因为它是一个C ++项目,所以我试图在GNU C ++下添加它们。结果,

编译器开始发布关于库中每个头的消息

强迫ISO C禁止这个以及......

让我们注意我的包含是

#include< gtk / gtk.h但我得到的结果与< gtk.hand> gtk /

gtk相同.h"。


我不明白,但是我想用eclipse来开发C / C ++因为

的正面Java经验。


你有什么想法,关于这个主题的大多数教程都已经过时了吗?

旧的CDT是完全不同的,特别是关于项目的/>
类型。

解决方案

Gotch @写道:


嗨所有,

我已经安装了Eclipse的CDT插件,我想用它在Cygwin下的C / C ++项目上工作。它可以工作,实际上它编译并运行通常的helloworld c ++程序。现在,当我尝试添加外部库时,很难实现
。比如...... GTK。让我们来解释一下我的尝试。 (哦

好​​吧,我正在使用Eclipse Europa 3.3.1和CDT 4.0.1)。首先我只是

添加了cygwin的路径包括通过项目 - > properties-


> C / C ++ General-> ;路径和符号窗口。我添加了
下的包含



GNU C gtk-2.0的路径包含在cygwin / usr / include / gtk-2.0

文件夹中。没有效果。它说它找不到gtk / gtk.h。



您添加了路径

/usr/include/gtk-2.0但代码需要

/ usr / include / gtk


尝试将gtk-2.0的符号链接设为gtk


-

jacob navia

jacob at jacob point remcomp point fr

logiciels / informatique
http://www.cs.virginia.edu/~lcc-win32


Windows文件访问例程没有看到符号链接......我会尝试

只需重命名文件夹...希望这不会破坏任何东西......


15 Gen,14:45,jacob navia< ja ... @ nospam.comwrote:


Gotch @写道:


大家好,

我已经安装了Eclipse的CDT插件,我想用它来工作
$在Cygwin下的C / C ++项目中获得b $ b。它可以工作,实际上它编译并运行通常的helloworld c ++程序。现在,当我尝试添加外部库时,很难实现
。比如...... GTK。让我们来解释一下我的尝试。 (哦

好​​吧,我正在使用Eclipse Europa 3.3.1和CDT 4.0.1)。首先我只是

添加了cygwin的路径包括通过项目 - > properties-


C / C ++ General-> Paths和符号窗口。我添加了
下的包含



GNU C gtk-2.0的路径包含在cygwin / usr / include / gtk-2.0

文件夹中。没有效果。它说它找不到gtk / gtk.h。



您添加了路径

/usr/include/gtk-2.0但代码需要

/ usr / include / gtk


尝试将gtk-2.0的符号链接设为gtk


-

jacob navia

jacob at jacob point remcomp point fr

logiciels / informatiquehttp://www.cs.virginia.edu/~lcc-win32


" Gotch @" < da ****** @ gmail.comwrites:


>

15 Gen,14:45,jacob navia < ja ... @nospam.comwrote:


> Gotch @写道:


嗨所有,

我已经安装了Eclipse的CDT插件,我想用它在Cygwin下的C / C ++项目上工作。它可以工作,实际上它编译并运行通常的helloworld c ++程序。现在,当我尝试添加外部库时,很难实现
。比如...... GTK。让我们来解释一下我的尝试。 (哦

好​​吧,我正在使用Eclipse Europa 3.3.1和CDT 4.0.1)。首先,我只是添加了cygwin的路径,包括通过项目 - >属性 -
C / C ++ General-> Paths and Symbols窗口。我在

GNU C中添加了包含在gtg-2.0中的路径包含在cygwin / usr / include / gtk-2.0

文件夹中。没有效果。它说它找不到gtk / gtk.h。


您添加了路径
/usr/include/gtk-2.0但代码需要
/ usr / include / gtk
尝试将gtk-2.0的符号链接设为gtk



Windows文件访问例程看不到符号链接...我会尝试

只是重命名文件夹...希望这个wuoldn不要分解任何东西......



你的问题是关于Cygwin,Eclipse和CDT,而不是关于C $ / $
编程语言。如果你需要帮助,你应该在论坛上询问

这些东西是主题。可能有一个Cygwin邮件

列表会有所帮助(参见 www.cygwin .com),或者也许是一个讨论
处理Eclipse的论坛。


-

Keith Thompson( The_Other_Keith)< ks *** @ mib.org>

诺基亚

我们必须做点什么。这是事情。因此,我们必须这样做。

- Antony Jay和Jonathan Lynn,是部长


Hi all,
I''ve installed the CDT plugin for Eclipse and I want to use it to work
on C/C++ projects under Cygwin. It works, in fact it compiles and runs
the usual helloworld c++ program. Now it comes difficult when I try to
add external libs. Such as... GTK. Let''s explain what I tried. (oh
well, I''m using Eclipse Europa 3.3.1 and CDT 4.0.1). First I just
added the path of the cygwin includes throug the project->properties-

>C/C++ General->Paths and Symbols window. I added in Includes under

GNU C the path to the gtk-2.0 includes in cygwin/usr/include/gtk-2.0
folder. No effect. It says that it couldn''t find gtk/gtk.h . So, since
it''s a C++ project, I tried to add them under GNU C++. As a result the
compiler starts putting out messages about every header in the library
compelling that ISO C forbids this and that...
Let''s note that my include is
#include <gtk/gtk.hbut i get the same results with <gtk.hand "gtk/
gtk.h".

I don''t get it, but I''d like to use eclipse to devlop in C/C++ because
of positive Java experiences.

Do you have any ideas, most tutorials on the topic are outdated and
the old CDT is quite different, especially regarding the project
types.

解决方案

Gotch@ wrote:

Hi all,
I''ve installed the CDT plugin for Eclipse and I want to use it to work
on C/C++ projects under Cygwin. It works, in fact it compiles and runs
the usual helloworld c++ program. Now it comes difficult when I try to
add external libs. Such as... GTK. Let''s explain what I tried. (oh
well, I''m using Eclipse Europa 3.3.1 and CDT 4.0.1). First I just
added the path of the cygwin includes throug the project->properties-

>C/C++ General->Paths and Symbols window. I added in Includes under

GNU C the path to the gtk-2.0 includes in cygwin/usr/include/gtk-2.0
folder. No effect. It says that it couldn''t find gtk/gtk.h .

You addedd the path to
/usr/include/gtk-2.0 BUT the code expects
/usr/include/gtk

Try to make a symbolic link of gtk-2.0 to gtk

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32


The symlink is not seen by Windows file access routines... I''ll try to
just rename the folder... hope this wuoldn''t break up anything...

On 15 Gen, 14:45, jacob navia <ja...@nospam.comwrote:

Gotch@ wrote:

Hi all,
I''ve installed the CDT plugin for Eclipse and I want to use it to work
on C/C++ projects under Cygwin. It works, in fact it compiles and runs
the usual helloworld c++ program. Now it comes difficult when I try to
add external libs. Such as... GTK. Let''s explain what I tried. (oh
well, I''m using Eclipse Europa 3.3.1 and CDT 4.0.1). First I just
added the path of the cygwin includes throug the project->properties-

C/C++ General->Paths and Symbols window. I added in Includes under

GNU C the path to the gtk-2.0 includes in cygwin/usr/include/gtk-2.0
folder. No effect. It says that it couldn''t find gtk/gtk.h .


You addedd the path to
/usr/include/gtk-2.0 BUT the code expects
/usr/include/gtk

Try to make a symbolic link of gtk-2.0 to gtk

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32


"Gotch@" <da******@gmail.comwrites:

>
On 15 Gen, 14:45, jacob navia <ja...@nospam.comwrote:

>Gotch@ wrote:

Hi all,
I''ve installed the CDT plugin for Eclipse and I want to use it to work
on C/C++ projects under Cygwin. It works, in fact it compiles and runs
the usual helloworld c++ program. Now it comes difficult when I try to
add external libs. Such as... GTK. Let''s explain what I tried. (oh
well, I''m using Eclipse Europa 3.3.1 and CDT 4.0.1). First I just
added the path of the cygwin includes throug the project->properties-
C/C++ General->Paths and Symbols window. I added in Includes under
GNU C the path to the gtk-2.0 includes in cygwin/usr/include/gtk-2.0
folder. No effect. It says that it couldn''t find gtk/gtk.h .


You addedd the path to
/usr/include/gtk-2.0 BUT the code expects
/usr/include/gtk

Try to make a symbolic link of gtk-2.0 to gtk


The symlink is not seen by Windows file access routines... I''ll try to
just rename the folder... hope this wuoldn''t break up anything...

Your question is about Cygwin, Eclipse, and CDT, not about the C
programming language. If you want help, you should ask in a forum
where these things are topical. Possibly one of the Cygwin mailing
lists would be helpful (see www.cygwin.com), or perhaps a forum that
deals with Eclipse.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"


这篇关于Eclipse CDT,cygwin和链接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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