Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-03-20
3
Medium Priority
?
1,720 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 1500 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

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…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 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