Thread: problem with using gcc
06-01-2009, 03:35 PM #1
problem with using gcc
- Member Since
- Jun 01, 2009
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.
06-02-2009, 06:28 AM #2
- Member Since
- Jan 29, 2008
- Mendocino, CA
- 17" MacBook Pro A1297 2.3 GHz i7 4GB DDR-1333
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!
06-02-2009, 09:31 AM #3
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By aloknabi in forum OS X - Development and DarwinReplies: 0Last Post: 01-11-2010, 02:31 AM
By email@example.com in forum OS X - Development and DarwinReplies: 1Last Post: 01-13-2008, 11:26 PM
By jonnyd in forum OS X - Development and DarwinReplies: 2Last Post: 12-29-2007, 04:34 PM
By Destructive in forum OS X - Apps and GamesReplies: 2Last Post: 12-17-2007, 11:40 PM
By pokamonster in forum OS X - Operating SystemReplies: 1Last Post: 08-02-2007, 10:27 PM