Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Cygwin Path
Cygwin Path [message #165400] Tue, 07 March 2006 23:45 Go to next message
Eclipse UserFriend
Originally posted by: dqn.email.arizona.edu

I've been looking around, but havn't come across anything that is of use
to me. I want to configure Eclipse to use cygwin to make and build my C
programs, but I don't want to put cygwin in my path. It seems that
putting cygwin in my path actually messes up more than a few pieces of
software on my computer, so I just want to set it up for compiling in
eclipse.
Re: Cygwin Path [message #165515 is a reply to message #165400] Wed, 08 March 2006 16:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andy.green.nospam.oxsemi.com

Duy Nguyen wrote:
> I've been looking around, but havn't come across anything that is of use
> to me. I want to configure Eclipse to use cygwin to make and build my C
> programs, but I don't want to put cygwin in my path. It seems that
> putting cygwin in my path actually messes up more than a few pieces of
> software on my computer, so I just want to set it up for compiling in
> eclipse.
>


In the 'environment' tab of the make builder, you can click 'select' and
it gives you a selection of environment variables to set in the make
shell. Just click/edit the ones you need.

However I have an idea it may be better to set it in your system path,
as I think eclipse uses the gcc toolchain to parse your code for
completions/errors etc. Not sure - I haven't been playing for long enough.
Re: Cygwin Path [message #165531 is a reply to message #165515] Wed, 08 March 2006 19:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dqn.email.arizona.edu

That didn't work. It still claims at cygwin1.dll is missing (works fine
if I put the cygwin/bin folder in the system path, though).

I still don't want to add the cygwin/bin folder to my system path because,
as I said before, it seems that doing that interferes with a few pieces of
software that I use. I'm not too keen on finding replacement software
that'll work with cygwin, especially if cygwin may interfere with new
software I might install later.
Re: Cygwin Path [message #165539 is a reply to message #165531] Wed, 08 March 2006 22:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sscout.gmpexpress.net

Duy Nguyen wrote:
> That didn't work. It still claims at cygwin1.dll is missing (works fine
> if I put the cygwin/bin folder in the system path, though).
>
> I still don't want to add the cygwin/bin folder to my system path
> because, as I said before, it seems that doing that interferes with a
> few pieces of software that I use. I'm not too keen on finding
> replacement software that'll work with cygwin, especially if cygwin may
> interfere with new software I might install later.
>

The trick is to configure the environment for your application, not for
Eclipse/CDT. Open the Run menu and select "Run...". Choose your
application from the list on the left. There should be an "Environment"
tab, or something similar, on the right side (can't check right now; I'm
having other issues with the CDT at the moment) - try adding cygwin/bin
to the path in the application's environment. Should find the .dll
fine, and you won't have to mess up your system/user environment to pull
it off.

Shawn
Re: Cygwin Path [message #165546 is a reply to message #165539] Wed, 08 March 2006 22:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sscout.gmpexpress.net

Shawn Scout wrote:
> Duy Nguyen wrote:
>
>> That didn't work. It still claims at cygwin1.dll is missing (works
>> fine if I put the cygwin/bin folder in the system path, though).
>>
>> I still don't want to add the cygwin/bin folder to my system path
>> because, as I said before, it seems that doing that interferes with a
>> few pieces of software that I use. I'm not too keen on finding
>> replacement software that'll work with cygwin, especially if cygwin
>> may interfere with new software I might install later.
>>
>
> The trick is to configure the environment for your application, not for
> Eclipse/CDT. Open the Run menu and select "Run...". Choose your
> application from the list on the left. There should be an "Environment"
> tab, or something similar, on the right side (can't check right now; I'm
> having other issues with the CDT at the moment) - try adding cygwin/bin
> to the path in the application's environment. Should find the .dll
> fine, and you won't have to mess up your system/user environment to pull
> it off.
>
> Shawn

OK, got my CDT install working again after browsing the newsgroup for a
bit. Here's what I did on the "Run.." dialog.

- Select the project you are trying to run
- On the "Environment" tab, click the "Select.." button to add an
environment variable; select the PATH variable and click OK
- You should now see the PATH variable in the list; select it and
click the "Edit..." button
- Add your cygwin/bin directory (I prepended it to the path - I find
that I have fewer issues when I do this)

Now your application should run fine.

Shawn
Re: Cygwin Path [message #165685 is a reply to message #165531] Fri, 10 March 2006 02:39 Go to previous messageGo to next message
Eclipse UserFriend
Duy,

just in case other suggestions don't work, something I did was to start
eclipse from a batch file where the PATH is first modified to contain the
cygwin/bin directory. In this way you don't need to set the path globally
for your entire system but it will be in place for eclipse and all the
subprocesses that are spawned from it (including build and application run
sessions).

Maybe that's what you need?


Norbert Ploett
Re: Cygwin Path [message #166029 is a reply to message #165515] Fri, 17 March 2006 13:54 Go to previous message
Eclipse UserFriend
Hello.

I want to establish exactly the same thing - to have CDT work with
Cygwin that is not present in the System enviroment. Everything seems to
work fine if you just add Cygwin/bin path everywhere enviroment is
settable (in Preferences/C_C++/Make/New make projects,
Preferences/C_C++/Managed build and Run...). You just select the prepend
option or type "c:\Progra~1\Cygwin\bin\;${env_var:PATH}".

Anyway.. With all this I managed to get the program to compile itself
and I can also run it in eclipse's console. But all the time I got a
warning in the Problems tab saying: "File not indexed because it was not
built" and every now and then (when I was playing around with settings)
another error showed up saying: "Error launching external scanner info
generator (gcc -E -P -v -dD
D:/Projects/.metadata/.plugins/org.eclipse.cdt.make.core/spe cs.c) ". To
sum up - compiling and running worked fine also with the errors and
after a while of playing around with settings also the error regarding
gcc went away, but it reappeared after restarting eclipse (it seems that
some Enviroment setups are mixed up and reused?).

Imho this problems are connected with the information gathering
mechanism that (as it looks) doesn't know where to find my gcc binary
(it doesn't use the Enviroment settings that can be set from within the
program). How to solve this?

(I created a Managed Make C Project in Eclipse SDK 3.1.2 with CDT 3.0.2)


gw


andy.green@nospam.oxsemi.com wrote:
> Duy Nguyen wrote:
>> I've been looking around, but havn't come across anything that is of
>> use to me. I want to configure Eclipse to use cygwin to make and
>> build my C programs, but I don't want to put cygwin in my path. It
>> seems that putting cygwin in my path actually messes up more than a
>> few pieces of software on my computer, so I just want to set it up for
>> compiling in eclipse.
>>
>
>
> In the 'environment' tab of the make builder, you can click 'select' and
> it gives you a selection of environment variables to set in the make
> shell. Just click/edit the ones you need.
>
> However I have an idea it may be better to set it in your system path,
> as I think eclipse uses the gcc toolchain to parse your code for
> completions/errors etc. Not sure - I haven't been playing for long enough.
Previous Topic:Eclipse GDB settings and usage questions
Next Topic:Creating project that can be used in Window and Linux environment
Goto Forum:
  


Current Time: Sun Jun 08 09:05:48 EDT 2025

Powered by FUDForum. Page generated in 0.09538 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top