codeofnode
codeofnode

Reputation: 18619

What is the post install procedure to run c++ programs in cygwin on windows..?

I have installed cygwin on windows xp.

On command prompt i type cygcheck -c cygwin it give the version of cygwin and says status ok.

but when i type gcc --version it give 'gcc command not found'.

What error i am making. Or is there anything post install procedure after installing cygwin..?

Upvotes: 0

Views: 2451

Answers (3)

dadoz
dadoz

Reputation: 11

Just to be on the safe side make sure you really ticked in the "GCC for Cygwin 32bit toolchain (C++)" in the setup.

If you have done this then you should have gcc in your bin directory but you need to create a link and also add it to your path.

To create a link (so that you can use just 'gcc' in short) go to the bin directory and create the link as below:

ln -s i686-pc-cygwin-gcc.exe gcc

This will create a symbolic link gcc that points to the real executable ln -s i686-pc-cygwin-gcc.exe gcc. When this is set up you still need to add the bin directory to your path to be able to invoke gcc anywhere.

Upvotes: 0

Ed Heal
Ed Heal

Reputation: 60007

Update the PATH environment variable to include the path where gcc lives. You may also need other environment variables - see here - for example environment variables for include path etc.

Upvotes: 1

srbhkmr
srbhkmr

Reputation: 2104

Make sure that you've updated the PATH env. variable to include "c:\cygwin\bin" (or where ever you've your cygwin binary files installed)

Upvotes: 0

Related Questions