Solved

Installing and using GCC on Cygwin - "set the environment variable CC to a working compiler"

Posted on 2004-03-20
3
1,686 Views
Last Modified: 2013-12-26
I'm in a C++ class and I need to compile my programs so that they will run on the school's Unix platform. The compiler at school is called xlC, but I couldn't find a download for that on the internet so I'm trying GCC instead. I downloaded and installed Cygwin (from cygwin.com) so that I could use Unix on my PC, and now I'm trying to set up/run GCC. I'm trying to follow the directions on http://gcc.gnu.org/install/configure.html. Here's what happens:

Chiara Whiting@Chiara /cygdrive/c/chiara
$ mkdir c:/chiara/cfiles

Chiara Whiting@Chiara /cygdrive/c/chiara
$ cd c:/chiara/cfiles

Chiara Whiting@Chiara /cygdrive/c/chiara/cfiles
$ c:/program%20files/gcc-3.3.3/configure
Configuring for a i686-pc-cygwin host.
*** This configuration is not supported in the following subdirectories:
     target-libffi target-boehm-gc target-zlib target-libjava
    (Any other directories should still work fine.)
Created "Makefile" in /cygdrive/c/chiara/cfiles using "mh-frag"
cc: not found
*** The command 'cc -o conftest -g   conftest.c' failed.
*** You must set the environment variable CC to a working compiler.


Multiple Google searches have helped very little. I think I need to find a precompiled binary of GCC, but I don't know where.

Here's my system info:
Dell Latitude D600
Windows XP
GCC 3.3.3
The cygwin and GCC-3.3.3 folders are located in C:\Program%20Files.

I know nothing about Unix, as you can probably tell. Please explain this to me using small words. :) Thanks!
0
Comment
Question by:cmw44
3 Comments
 

Author Comment

by:cmw44
ID: 10642026
P.S.
C:/Chiara/cfiles is the directory where I'd like to save the compiled C++ programs.
0
 
LVL 12

Accepted Solution

by:
stefan73 earned 500 total points
ID: 10642170
Hi cmw44,
You don't need to compile or setup anything on gcc with cygwin. Just pick the gcc packet of cygwin to install and that's it. Runs right out-of-the-box.

Be warned about compiling gcc yourself - I did this on a 8 CPU Sun Enterprise machine with parallel make and it took about 1 hour and more than 1GB of HD space.

Cheers!

Stefan
0
 
LVL 86

Expert Comment

by:jkr
ID: 10644198
Edit the makefile to read

$CC=gcc

instead of

$CC=cc
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now