Though placing this thread on this messageboard makes no sense, my question is, what free compiler and environment should I try and use on my Mac for learning (or at least messing around with) C++?

This is pretty much my first attempt to learn anything technology related, and I'm trying to learn a whole programming language right off through the logic that trying to take my time and download more programs that will actually work on my computer will be harder than just having one project that's way too hard.

I've been trying to use CodeBlocks; however it doesn't seem to be really meant for Macs, and though I've had the most success with it so far, the MingW compiler doesn't work well (if it even downloaded, pretty fuzzy on that).

I can't download Apple XCode as my shiny new computer isn't quite shiny and new enough to run the latest version.

Suggestions? Sort of tired of Googling answers and having all the answers be, 'Google it N00B.'

If you are seriously motivated and not intimidated by the material, and you want to program games (I'm extrapolating that from your post) then go big. You'll learn a lot from a lower-level language about how graphics and hardware interact, how the machine uses memory, all that jazz.

If you can do it, you'll learn a lot. However, you'll likely get stumped on some stupid syntax requirement and get lost. That's why Processing is a wonderful language to start with. It is (IIRC) a Java version that is specifically designed to let you start doing simple graphical programs, i.e. all the drudge work is done for you, letting you do the cool stuff instead. There is also a library of very instructive examples to work from.

Doesn't mac come with a developer package (Xcode)? I have a mac for personal use but I code at work on a linux machine (I use gedit to edit and g++ to compile). Grab the book C++ primer plus. Usually I hate programming books because I don't learn anything, however, C++ Primer Plus is one of my favorites. I code for scientific applications so my advice might not be the best for game coding.

I love C++ but because of legacy code I use Fortran 90 mostly (I like it too but it is outdated).

Doesn't mac come with a developer package (Xcode)? I have a mac for personal use but I code at work on a linux machine (I use gedit to edit and g++ to compile). Grab the book C++ primer plus. Usually I hate programming books because I don't learn anything, however, C++ Primer Plus is one of my favorites. I code for scientific applications so my advice might not be the best for game coding.

I love C++ but because of legacy code I use Fortran 90 mostly (I like it too but it is outdated).

The install disc for my computer is, for now, lost somewhere in the morass of my parent's 'filing system'. On the Mac website there are downloads for XCode but, as mentioned, none of the versions I've found will download/are at least sorta up-to-date.

I've found a lot of promising C++ tutorials online; getting a compiler and IDE that will work are my current concerns.

So you have the latest version of Snow Leopard. You can access the Mac App Store and get hold of XCode from there, I think. I'm on Lion, so I can't double check. There was one version that you had to pay for, but it wasn't too expensive.

Snow Leopard is supported by MacPorts, so you can get all sorts of compilers from there. You just need any version of XCode installed to get MacPorts going, so the old versions should be fine.

Don't bother with XCode as an IDE if you are not going to be purely targeting the Mac.

NetBeans is a pretty good IDE and has support for C++. It's also cross-platform so you can use the same IDE on Windows.

That said, I'd strongly suggest starting with a basic text editor and the command line. At some point, you'll hit a problem that requires you to know what your IDE is doing under the hood and starting that way will mean that you can figure it out.

WINE is a useful tool for getting Windows programs to run, but I would think twice about using it as a target for development. Better to use VirtualBox or similar to get a Windows install running on your Mac and test your code in that.

So:

Get an old XCode either from the web as you have already found or from the App Store

Download and install MacPorts

'port install gcc' to get the latest version of the GCC compiler

Use vi or emacs or textedit or TextWrangler to create a simple HelloWorld.cc

What exactly happens? Does in mount the disk image ok? What do you see in the disk image? What do you do next, and what exact error messages does it produce? Do you have any other version of XCode installed? Do you have a /Developer folder already? Do you have anything in /Applications named XCode?

It appears in Downloads, but when I try to open it it labels it 'not recognized'. I've heard that my computer should have a version of XCode already on the install disk, but that has to be installed separately and the disk is currently lost. I have nothing named XCode in Applications or anywhere else I've looked.
/Developer folder?

It appears in Downloads, but when I try to open it it labels it 'not recognized'. I've heard that my computer should have a version of XCode already on the install disk, but that has to be installed separately and the disk is currently lost. I have nothing named XCode in Applications or anywhere else I've looked.

/Developer folder?

That normally indicates that the .dmg file is corrupt. Try downloading again, and if that doesn't fix it try the previous version 3.2.5 which is available at the same page - it's possible, although unlikely, that the 3.2.6 .dmg is corrupt on the Apple server.

/Developer is a folder that is created by an old install of XCode. Now that it is distributed through the App Store, it installs in /Applications instead.

There are some other things to try on this list at Apple Support Communities.

I've installed XCode and macports; should macports open as an application? It's showed up as a folder in my documents, however, it does not seem to be doing anything.

It's a command line based application, so you need to work from Terminal, which is in Applications/Utilities.

As I mentioned above, you should now be able to type 'port install gcc' to get the latest version of the compiler. You might need to do 'sudo port install gcc' if it complains about permissions.

What version of XCode did you get to install? You may also be able to run Xcode, go to preferences, downloads, and select and install 'command line tools' to get a compiler you can run from the terminal installed as well.

Then try to write and compile a simple program as above.

In any case, having MacPorts installed gives you simple access to a vast set of different languages, libraries and tools to play with.

Worleys-iMac:~ brianworley$ sudo port install gcc47
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
---> Computing dependencies for gcc47Error: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
Worleys-iMac:~ brianworley$

I moved the macports to applications; however, I have to navigate to it by using the search function at the top of the finder window in applications. This hadn't been an issue before. Should I move the macports files to somwhere else?
Also, I know for a fact that XCode is on my computer, installed and able to be opened; not having gcc yet, though, I haven't done much with it. Opening the installer and re-installing it to be sure, however, results in it telling me that it can't be installed because either necessary data is missing or my internet connection is faulty (I doubt the latter).

Warning: Xcode does not appear to be installed; most ports will likely fail to build.
---> Computing dependencies for gcc47Error: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?
Worleys-iMac:~ brianworley$

I moved the macports to applications; however, I have to navigate to it by using the search function at the top of the finder window in applications. This hadn't been an issue before. Should I move the macports files to somwhere else?
Also, I know for a fact that XCode is on my computer, installed and able to be opened; not having gcc yet, though, I haven't done much with it. Opening the installer and re-installing it to be sure, however, results in it telling me that it can't be installed because either necessary data is missing or my internet connection is faulty (I doubt the latter).

That all sounds very odd... Why did you move macports? By move, do you mean that you moved the directory /opt/local into /Applications? /opt/local is where MacPorts installs all of it's stuff. I'm not sure what it is that you are navigating to in Finder - once MacPorts is installed, you should be able to do all you need to from a terminal window.

Ok. Let's come at this from a different direction. Can you run XCode, go to the Preferences, select Downloads, and install 'Command Line Tools'. Reboot (just to be sure) then do 'which make' and 'which gcc' and post the results.

I moved everything under macports to the screen that contains opt local; I had tried to place it in opt local, but it only placed it beside it. Trying to move those files to opt local failed: 'The items can’t be moved because “local” can’t be modified.'

Trying Terminal again, I get a the same error message.

Generally, when I download something onto the computer, it appears in downloads, where I drag it from to place wherever I intend to use it from. I had moved Macports from downloads to Applications originally.

processing.app.SketchException: unexpected char: 'i'
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:353)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:197)
at processing.mode.java.JavaBuild.build(JavaBuild.java:156)
at processing.mode.java.JavaBuild.build(JavaBuild.java:135)
at processing.mode.java.JavaMode.handleRun(JavaMode.java:176)
at processing.mode.java.JavaEditor$20.run(JavaEditor.java:481)
at java.lang.Thread.run(Thread.java:680)