Solved

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

Posted on 2004-03-20
3
1,703 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 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