| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
|
Member Since: Feb 25, 2009
Posts: 2,084
![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 Non-retina MBP, 2.6GHz i7, 8GB RAM, Antiglare Screen
|
That error usually shows up if either:
1) The path to the executable is not in the exported path 2) The software hasn't been installed. Just out of curiosity, have you installed g++, or the xcode developer pack? AFAIK, installing OSX by itself doesn't install the compilers. I think a version of XCode may be on the OSX disc that you can install, but you might as well get the most current version from apple and register as a developer. It's free and once properly installed, you should have no problems. My Macs: 2012 Non-Retina 15" MBP; Mac mini G4, 1.25 GHz, 512m ram (server); Late 2011 11" MBA, 1.8GHz i7, 4Gig Ram, 256Gig SSD, HD3000; Powerbook 12" G4 1.33GHz running Debian as a server; Apple TV (1080p version) |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,302
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Download the developer tools from the Apple developer site or install Xcode/dev tools from your OS X installation disc to get an installed binary of GCC. Your best bet is to get it from the Apple dev site though as Xcode will be a newer version there. Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
you have to be in the directory your source is in to compile it.
So, for instance.. if your password.cpp was in your home directory under a folder called source.. you'd have to cd ~/source g++ password.cpp -o RandomPasswd for it to compile. Or, you'd have to specify the path to the source like g++ /path/to/password.cpp -o RandomPasswd It can't guess where your source is. mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
![]() Member Since: Jan 31, 2009
Posts: 49
![]() |
Ok, so I put a folder called source in finder > steven (right below "desktop") and inside the source folder is the password.cpp and now I get this:
password.cpp: In function ‘int main()’: password.cpp:8: error: ‘srand’ was not declared in this scope password.cpp:18: error: ‘rand’ was not declared in this scope |
| QUOTE Thanks | |
![]() Member Since: Mar 17, 2008
Location: Tucson, AZ
Posts: 6,527
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2008 and 2011 15" mbps, late 11 iMac, iPhone 4s, and too many ipods and other stuff
|
mike This machine kills fascists Got # ? phear the command line! |
| QUOTE Thanks | |
|
Member Since: Feb 25, 2009
Posts: 2,084
![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 Non-retina MBP, 2.6GHz i7, 8GB RAM, Antiglare Screen
|
My Macs: 2012 Non-Retina 15" MBP; Mac mini G4, 1.25 GHz, 512m ram (server); Late 2011 11" MBA, 1.8GHz i7, 4Gig Ram, 256Gig SSD, HD3000; Powerbook 12" G4 1.33GHz running Debian as a server; Apple TV (1080p version) |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,302
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Transferring files to mac, Where do you put them? | MikeT | Switcher Hangout | 11 | 06-08-2007 03:02 AM |
| Can't copy files on to my mac | accordingi2ime | OS X - Operating System | 0 | 01-02-2007 04:44 AM |
| Problems copying files... PC to Mac... ps | zburd | Running Windows (or anything else) on your Mac | 0 | 10-10-2005 02:10 PM |
| Mac Users Get More ISP Choices | schweb | Apple Rumors and Reports | 1 | 03-06-2003 10:57 AM |
All times are GMT -4. The time now is 07:40 AM.
Powered by vBulletin