473,734 Members | 3,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Eclipse CDT, cygwin and linking problems

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.
Jan 15 '08 #1
10 8537
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
Jan 15 '08 #2
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.c omwrote:
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/informatiquehtt p://www.cs.virginia .edu/~lcc-win32
Jan 15 '08 #3
"Gotch@" <da******@gmail .comwrites:
>
On 15 Gen, 14:45, jacob navia <ja...@nospam.c omwrote:
>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_Keit h) <ks***@mib.or g>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jan 15 '08 #4
Gotch@ wrote, On 15/01/08 17:17:
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...
<snip>

This is not topical here for two reasons
1) You state you are using C++, that is not the language we discuss here
2) Your problem is with your tools rather than the language.

I'm sure there are Eclipse mailing lists, I suggest you try checking
them out, finding the correct one, and asking there. Or possibly on the
gcc, Cygwin or GTK mailing lists, as your problem might be with those
rather than Eclipse itself. However *check* what is topical before
posting your question somewhere else.
--
Flash Gordon
Jan 15 '08 #5
jacob navia <ja***@nospam.c omwrites:
Flash Gordon wrote:
>Gotch@ wrote, On 15/01/08 17:17:
>>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...

<snip>

This is not topical here for two reasons
1) You state you are using C++, that is not the language we discuss here
2) Your problem is with your tools rather than the language.

I'm sure there are Eclipse mailing lists, I suggest you try checking
them out, finding the correct one, and asking there. Or possibly on
the gcc, Cygwin or GTK mailing lists, as your problem might be with
those rather than Eclipse itself. However *check* what is topical
before posting your question somewhere else.

Actually it is a language problem

He added
\include\gtk-2.0 (what is equivalent to calling the compiler
with -I\include\gtk-2.0) but the source code expects
\include\gtk.

Note that when you write
#include <gtk/gtk.h>
the language supposes that directories exist and that there
is a subdirectory "gtk" in the normal system includes
directory.
[...]

The *language* does no such thing; an implementation very likely does.

C99 6.10.2p2:

A preprocessing directive of the form

# include <h-char-sequencenew-line

searches a sequence of implementation-defined places for a header
identified uniquely by the specified sequence between the < and >
delimiters, and causes the replacement of that directive by the
entire contents of the header. How the places are specified or the
header identified is implementation-defined.

Note the lack of any mention of directories or subdirectories, or of
any implication that '/' is a directory path delimiter.

Even if you think this is nitpicking, that it's obvious that <gtk/...>
must refer to a directory named "gtk", it's not at all obvious what
the proper solution is. I doubt that either creating a symlink or
renaming the folder is the right approach.

<OT>

You wrote:

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

But in fact, on my Cygwin installation the header file the OP is
looking for is at /usr/include/gtk-2.0/gtk/gtk.h (note that "gtk" is a
subdirectory of "gtk-2.0"().

My best guess is that the problem is a confusion between Windows and
Cygwin paths (the directory "/usr/include/gtk-2.0" as seen from Cygwin
might be called, for example, "C:\cygwin\usr\ include\gtk-2.0" as seen
from Windows). If that's the problem, a Cygwin mailing list would
be the best place to ask about it.

</OT>

--
Keith Thompson (The_Other_Keit h) <ks***@mib.or g>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jan 15 '08 #6
CJ wrote:
On 15 Jan 2008 at 20:51, jacob navia wrote:
>How many times I have misspelled a variable and couldn't
find the error?

Perhaps you should switch to a compiler that issues a useful diagnostic
message for undeclared variables?
If the variable wasn't defined. The *real* problem is when you
have some variable that *is* defined but it is not the one
you want.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 15 '08 #7
CJ
On 15 Jan 2008 at 20:51, jacob navia wrote:
How many times I have misspelled a variable and couldn't
find the error?
Perhaps you should switch to a compiler that issues a useful diagnostic
message for undeclared variables?

Jan 15 '08 #8
Flash Gordon wrote:
Gotch@ wrote, On 15/01/08 17:17:
>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...

<snip>

This is not topical here for two reasons
1) You state you are using C++, that is not the language we discuss here
2) Your problem is with your tools rather than the language.

I'm sure there are Eclipse mailing lists, I suggest you try checking
them out, finding the correct one, and asking there. Or possibly on the
gcc, Cygwin or GTK mailing lists, as your problem might be with those
rather than Eclipse itself. However *check* what is topical before
posting your question somewhere else.
Actually it is a language problem

He added
\include\gtk-2.0 (what is equivalent to calling the compiler
with -I\include\gtk-2.0) but the source code expects
\include\gtk.

Note that when you write
#include <gtk/gtk.h>
the language supposes that directories exist and that there
is a subdirectory "gtk" in the normal system includes
directory. The user had a problem with the spelling of the path, not
with Eclipse/C++/whatever

I expect that in a group about C we can give people a hand
spotting those errors that are trivial, but somehow our
brain refuses to see.

How many times I have misspelled a variable and couldn't
find the error?
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Jan 15 '08 #9
On Tue, 15 Jan 2008 22:07:18 +0100, jacob navia wrote:
CJ wrote:
>On 15 Jan 2008 at 20:51, jacob navia wrote:
>>How many times I have misspelled a variable and couldn't
find the error?

Perhaps you should switch to a compiler that issues a useful diagnostic
message for undeclared variables?

If the variable wasn't defined. The *real* problem is when you
have some variable that *is* defined but it is not the one
you want.

I'd tend to think that if you're encountering this, your choice of
variable names is perhaps more at fault than anything, no?
Jan 16 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
2210
by: TuPLaD | last post by:
Hello, I just made a little C++ console application: #include "iostream" using namespace std; int main () { cout << "Hello Mars !"; return 0;
3
4468
by: David Komanek | last post by:
Hi all, I am trying to learn more about how to use g++/Cygwin to produce dll files on WinXP. And I have a problem which at the first look seems to be an obvious dll-export problem, but I don't think this is really the issue. Here is a description of my problem. MathLibrary.dll: - SpaceTimeVector (uses various stuff from this dll)
1
3573
by: Brian Hall | last post by:
I have both mingw and cygwin on a Windows machine. I have installed Eclipse, with the CDT, and written a 'Hello World' test program. I would like Eclipse to use the mingw complier but looking through the project's settings Eclipse seems to have created its own PATH variable with c:/cygwin/bin ahead of a suitable path to the mingw binaries. I can't figure out how to tell Eclipse that I do not want c:/cygwin /bin in the path (editing...
52
5984
by: lcw1964 | last post by:
Greetings, all, I am trying to port a little bit of math code to gcc, that in the original version used the long double version of several functions (in particular, atanl, fabsl, and expl). I get a complie-time "unidentified reference" error to the expl() calls, but gcc seems to digest atanl and fabsl just fine. Changing expl to exp cures the compile time problem, but I get at best double precision in the final results. I am assuming...
1
4416
by: douglas.nospam | last post by:
I've googled this problem and can't seem to find an answer. I get the error below when linking an executable which I am trying to port from Linux to Cygwin/XP. I'm not sure how to attack this...any thoughts? Do I possibly need to use some different g++ options when linking/compiling on cygwin -------------------- link error --------------------- g++ -lpthread -g stilverify.o libstil.so -o stilverify libstil.so: In function...
0
2000
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for more details". Same for all versions of JBoss. I couldn't find what causes the error. Any help would be much appreciated. My installation is: JDK 1.5.0 update 11 Jboss 4.0.4GA Eclipse 3.2.2
5
476
by: PG | last post by:
I am trying to compile a simple ODBC and C example on Windows XP SP2. I have Cygwin_NT 5.1. This is the code (obtained from http://www.easysoft.com/developer/languages/c/odbc_tutorial.html#dm_f...) i am attempting to compile. ODBCTest.c #include <stdio.h>
1
4562
by: Horacius ReX | last post by:
Hi, I am starting to use eclipse cdt and compile an old application without problems. But can not run it, because I need to increase the stack size. In linux I do it through the operating system through ulimit -s unlimited
0
8783
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9321
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9193
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8194
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6745
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6043
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4555
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.