Results 1 to 3 of 3
  1. #1

    Member Since
    Jun 01, 2009
    problem with using gcc
    I'm trying to use a c++ program that I made, which is a very simple integrator.
    I think I installed everything that I need, such as Dev tools, Xcode, gcc4.0 and other stuff that I might have installed. Anyhow, when I compile my program, it says,
    newtonc.cpp:1:19: error: iostream: No such file or directory
    newtonc.cpp: In function 'int main()':
    newtonc.cpp:31: error: 'cout' was not declared in this scope
    newtonc.cpp:31: error: 'endl' was not declared in this scope

    I think the problem is that I don't have iostream, which I heard to be installed when I install gcc. I'm pretty sure that I installed gcc, since when I type "which gcc" or "which gcc-4.0", it's saying "/usr/bin/gcc."

    It's possible that I installed gcc wrong. I didn't use terminal to install it. instead, i double clicked something called "gcc-intel-bin.tar", and it seemed to install automatically.
    I got think link, Installing GCC: Configuration - GNU Project - Free Software Foundation (FSF), and it's extremely difficult to find what I'm doing wrong or to follow what they are saying.

    I'm really confused. It would be great if you could help me.

  2. #2

    kahlil88's Avatar
    Member Since
    Jan 29, 2008
    Mendocino, CA
    I think you need to use gpp (which should be part of gcc) to compile C++ code.
    There is no system but GNU and Linux is one of its kernels.
    Join the FSF as an Associate Member!

  3. #3

    vansmith's Avatar
    Member Since
    Oct 19, 2008
    Early 2015 13" rMBP
    Do you mean g++? .
    Important Links: Community Guidelines : Use the reputation system if you've been helped.
    M-F Blog :: Write for the blog
    Writing a Quality Post

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with installing GCC compiler
    By aloknabi in forum macOS - Development and Darwin
    Replies: 0
    Last Post: 01-11-2010, 02:31 AM
  2. Gcc 4.2
    By olifu02@gmail.c in forum macOS - Development and Darwin
    Replies: 1
    Last Post: 01-13-2008, 11:26 PM
  3. How to upgrade gcc 3 to gcc 4 intel mac
    By jonnyd in forum macOS - Development and Darwin
    Replies: 2
    Last Post: 12-29-2007, 04:34 PM
  4. Gcc
    By Destructive in forum macOS - Apps and Games
    Replies: 2
    Last Post: 12-17-2007, 11:40 PM
  5. GCC on 10.4.10
    By pokamonster in forum macOS - Operating System
    Replies: 1
    Last Post: 08-02-2007, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts