Help in running Code::Blocks on Mac OSX. Should I use something else?

I'm starting to learn programming and can't seem to get Code::Blocks running on my lap top. Terminal says "Can't execute binary file." I'm trying to build the first "Hello World" C++ program but it would not build or run. Sometimes I get the message that it cannot access folder also.
Here's my code:
#include <iostream>
using namespace std;
int main()
cout << "Hello World !" << endl;
What C++ software do you recommend to start? Should I use any other than Code::Blocks?

As far as text editors, TextEdit will work, but as far as I know, you will constantly run into issues with formatting, spell-check, and other things. If you are guilty of "Which Button Do I Press?" then my first choice is likely not for you.
If you are comfortable using the "Terminal" app, then I suggest using EMACS, (or just emacs). There is a built-in tutorial, and it is a very powerful editor, although for a non command line user it can be daunting, as most of the formatting and editing commands are all control characters (so regular characters are always entered as text). Emacs will do nice highlighting of various language elements just like XCode does. vi is another command line editing tool available on every version of UNIX. Emacs comes with Mac OS/X, as does vi. I have no idea if vi helps with programming as the first thing I do when I start to work on any Unix or Linux box is copy over some version of emacs, so i don't use it except sparingly.
You can also continue to use XCode to edit the source files, as it does a nice job as a WYSIWYG editor and prompts you with help along the way. Just keep a terminal window open to use the command line to compile and link your program, but edit it in XCode and do a SAVE before you switch back to the terminal window.
I also use BBEdit from Bare Bones, and some people like TextWrangler. There are at least a dozen other text editors out there that have features you can enable for programming. Do a google search for Mac OSX text editors and you'll see what I mean.
I advise AGAINST using TextEdit, unless you set the file to "Plain Text". Also, don't use a .txt extension. Use .c, .cc, .ccp, .m, .mm, .js, or whatever the compiler expects to see for a specific language. Binaries will nearly always have a .o extension, and the final binary depends on the language, the linker and what options you provide. The default for c is a.out (or at least it used to be).
You will also want to learn how to use "make", but that is another discussion.
For starters, remember that "man" is your friend. If you want to look up information on Unix, and the command line on the Mac is talking to Unix, aka Darwin. Type "man man" for help getting started with the man command, and "man make" to get started with make. Note at the end of most man pages the section that says "See also", as this tells you about related commands.

Similar Messages

  • What OSX should I use on my 2009 MAC Book Pro? Will Yosemite run

    Hi I have a Mac Book Pro from 2009 and I was wondering what OSX should I use on my 2009 MAC Book Pro? Will Yosemite run properly on this computer?

    Welcome to Apple Support Communities
    Your Mac supports OS X Yosemite. If you need to upgrade your Mac, do it, but if you are happy with the OS X version you are running or you do not like changes (OS X Yosemite has got an interface change), you can keep it always that it is not very old.
    In order to upgrade to OS X Yosemite, it is as simple as opening the Mac App Store and downloading OS X Yosemite. When the download finishes, the installer will show up, so follow its steps. Before upgrading, it is important to make a backup of your files with Time Machine -> Mac Basics: Time Machine backs up your Mac - Apple Support You can also check that your applications are compatible with Yosemite in this website -> http://www.roaringapps.com
    OS X Yosemite should run properly, but I recommend you to run it with at least 4 GB of RAM (you can check how much RAM you have in the Apple menu -> About this Mac). In case Yosemite runs slowly, the backup you made will let you go back to your old version.

  • My 2011 MBP has begun running slow with frequent 'spinning beach ball' events. I'm running Yosemite and wondered if I should of use the original install disk for maintenance.

    My 2011 MBP has begun running slow with frequent 'spinning beach ball' events. I'm running Yosemite and wondered if I should of use the original install disk for a maintenance reinstall. I presume I'd have to download Yosemite again, though I'd be happy just using Snow Leopard again too.
    Thanks for the help.

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • To work with Pro Tools 9 . Wicht Mac mini should i use?

    To work with Pro Tools 9 . With Mac mini should i use.
    Intel Core i7 2.0GHz Quad-Core Processor or
    Intel Core i7 2.7GHz Dual-Core Processor.

    Please be aware that Mavericks is not supported with any Pro Tools system as of May 2014, there are a number of issues that make Pro Tools unstable. If you are buying a new computer Mavericks will be the supplied OS.
    Please get advice from your Pro Tools authorised reseller and from the Pro Tools community discussions on your specific system from folk who know and use Pro Tools inside out.
    Pro Tools Discussions

  • /usr/lib/System.dylib contains just ppc code on ppc Mac OSX

    Hello!
    Trying to compile universal binaries on ppc Mac OSX fails sometimes because when a project links against /usr/lib/System.dylib for both architectures, it fails for the i386 part. On i386 Mac OSX is works fine because there System.dylib contains ppc AND i386 code.
    I installed the latest XCode 2.2.1 from the DVD (adding all Cross Development Support) and ran the ppc Combo Update 10.4.6 but still ended up with a flat System.dylib.
    Is there a way to install ppc Mac OSX so that all its libraries and executables contain i386 code as well?
    Regards
    Philipp

    Jeff,
    Unless someone comes up with a better suggestion (it is almost midnight with our forum staff friends), you may consider a reinstallation (uninstall, run the Cleaner Tool, and reinstall).
    http://www.adobe.com/support/contact/cscleanertool.html

  • Script won't run on machine w/MAC OSX Server 10.4.9

    Why won't the following script work on a machine that is running MAC OSX Server 10.4.9. On Machines running Mac OS X 10.4.9 it works fine, but on my server machine it won't name the file as per the script--the menu dialog box pops ("save as") up asking for a file name.??
    The only difference between the machines as far as I can tell is the OS.
    Thanks.
    Pedro
    global fileSpec
    tell application "TextEdit"
    activate
    tell application "Finder" to set visible of process "TextEdit" to false
    tell application "Finder"
    set theFileName to "Date.rtf"
    set fileSpec to "Photo [Data]:Archive error LOG:" & theFileName
    end tell
    save document 1 in fileSpec
    tell text of document 1
    set the size to 20
    set the font to "Lucida Grande"
    end tell
    close document 1 saving yes
    end tell
    G5   Mac OS X (10.4.9)  

    Edit: sorry, you should be choosing a folder, not a file. Try this script instead.
    tell application "Finder"
        activate
        set tempy to choose folder
        display dialog ("" & tempy)
    end tell

  • How to run .rdp file in Mac OSX?

    I have installed Microsoft Remote Desktop 8.0.5 For MAC OSX 10.8.5 and added new remote connection in the list which works fine.
    Now i export same connection to .rdp file but when i execute it mstsc opens remote os login screen for user password to login (which is already in keychain store).
    Question:
    how can i launch .rdp file so that it will not ask remote user password?
    where/how to store password?
    ------- .RDP File ----------
    screen mode id:i:0
    use multimon:i:1
    session bpp:i:32
    full address:s:192.168.1.130
    audiomode:i:0
    username:s:mylabs\administrator
    disable wallpaper:i:0
    disable full window drag:i:0
    disable menu anims:i:0
    disable themes:i:0
    alternate shell:s:
    shell working directory:s:
    authentication level:i:0
    connect to console:i:0
    gatewayusagemethod:i:0
    disable cursor setting:i:0
    allow font smoothing:i:1
    allow desktop com
    bookmarktype:i:3
    use redirection server name:i:0
    Thanks in advance

    Hi Mandar,
    Thank you for your posting in Windows Server Forum.
    “create a simple shell script to launch my remote desktop connection. Eg: if I want to launch SteiniServer.rdp, then my script would look like this:
    open "/Applications/Remote Desktop Connection.app" ~/Documents/RDC/SteiniServer.rdp”
    (Quoted from below article).
    Please go through below article might helpful in your case.
    Quickly Launch Remote Desktop Connections on Mac OS X
    Hope it helps!
    Thanks.
    Dharmesh Solanki

  • Errors running Java app on Mac OSX

    Hello,
    I've written a Java application and packaged it as a JAR file that runs fine on Windows. When I try to run it on
    Mac OSX, though, I get the following error:
    % java -jar Clavis.jar
    Exception in thread "main" java.lang.NoClassDefFoundError:
    java/awt/KeyEventDispatcher
    at Clavis.main(Clavis.java:7)
    I'm assuming this means that the program needs and is somehow not getting access to the java.awt.* classes it requires. How can I tell it where they are? Is it possible to do this within the JAR file so that users don't have to configure this manually?
    Five dukes for the first good answer!
    Thanks much--
    David

    From Apple's Java FAQ:
    Q: When will Apple have an implementation of J2SE 1.4 available?
    A: A Java 1.4 Developer Preview was released at WWDC2002 to all seeded ADC members. This pre-release has only been qualified against the WWDC Jaguar seed, and has not been qualified against any other seeds/builds, including the final release of Mac OS X 10.2. It is for this reason that the WWDC preview has remained unavailable to ADC members, even though Jaguar has shipped.
    The product development cycle includes plans to seed an additional, more complete prerelease version of J2SE 1.4.1 to developers. Specific dates for releases have not been determined and are in part dependent upon Sun's release schedule. Please note that J2SE 1.4.x will not be available in any form for versions of Mac OS X prior to 10.2.
    If it follows the same pattern as past releases, the answer to your question will probably be months, albeit a low number of them, from Sun's official release date of 1.4.
    -SC

  • Not able to run forms on a mac osx lion

    Hi:
    I'm using Forms 9 and oracle 10g . I setup formsweb.cfg, and I can't run my form, browser is blank !
    I need to instal some plug-in or I missing something else in my server or mac ?
    Thanks a lot !

    Forms 9 is pretty old. You may have a problem running on a MAC because the requirement for Forms 9.0.4 was JDK 1.4. Having such an old JDK on a MAC may not be desirable. Refer to the old Forms 9.0.4 Certification Matrix for details:
    http://www.oracle.com/technetwork/developer-tools/forms/clientsod-forms10g-094744.html

  • Wireless insanely slow in Mac OSX, normal when using boot camp

    I have my recently purchased Macbook (White) always in the same place hooked up to my external display, one floor above the wireless g router.
    However, when I am in Mac OSX 10.5.5, my network is REALLY REALLY PAINFULLY slow. It has the same reception (airport logo almost full) but Safari times out, cannot sometimes even load Google, etc. etc., making networking almost unusable in Mac OSX. However, when I use Windows XP on Boot Camp, it is the normal speed.
    My other Macbooks (older versions) do not have this problem. They all have Mac OSX 10.5 installed with all the updates, and have the same Windows XP in Boot Camp. Still I think this is a software issue rather then a hardware issue because in Boot Camp everything is fine. They all have the firewall turned on. They all have the same reception. They are all (alternate) in the exact same spot.
    Any suggestions?

    Tried it.
    I even reinstalled Mac OSX from scratch, and still the same problem.
    The update from some time ago (the Airport update for intel macs) does not matter.
    Restarting my router does not matter. I also get good internet reception on my iPhone 3G.
    And, in Windows still OK reception.
    I have also noticed that my internet download speed changes from 20kbps to 80 kbps and back again.
    Repairing permissions does not matter either.

  • I have a MacBook running 10.5.8 Mac OSX, Im able to use Safari but I cannot get into itunes. I cannot update itunes, it tells me to check my internet connections. Can anyone please help me?

    When I try to connect to itunes the message say's error 11333. When i try to update itunes the computer say's it cannot connect and further tells me to check my connections. Once again I am able to use safari to get onto the internet fine. I went on trouble shooting at apple.com, but the thing's it told me to try failed. Can anyone please help?

    Hey, Buzz.
    You can download the latest version of iTunes supported on Leopard here:
    http://support.apple.com/kb/DL1575
    I hope that helps.

  • Should Firefox 3.6.16 run properly on a Mac OSX 10.4.11?

    I use Yahoo, and I get the impression that they don't work together as well as they used to. Sometimes I lose a link or it's slow loading, and some times it's just plain slow. I'm about ready to switch to Safari. I have little knowledge of Java, plug-ins, etc. or the intricacies/mechanics of the system. I just need to know if it will run on a G5 processor with OSX 10.4.11. This all came up when you invited me to Download Firefox 4, only to find out after I started, that it wouldn't run on this computer. At some point in my in my search for a bit more clarification, I came upon something that led me to believe that there may be some incompatibility issues between Firefox and my operating system. I've spent the better part of an hour trying to verify system requirements, but I can't locate any specs. I consider this computer to be a tool, not a toy, and I'm tired of playing with it.

    I FINALLY SOLVED MY HANGING, "STOPPED" LOADING AND FORCE QUIT PROBLEMS AFTER TRYING EVERYTHING SHORT OF ARCHIVE AND INSTALL.
    I FINALLY SOLVED MY HANGING, "STOPPED" LOADING AND FORCE QUIT PROBLEMS AFTER TRYING EVERYTHING SHORT OF ARCHIVE AND INSTALL:
    I HAD TO RESTART
    "FORCED" TEN TIMES A DAY:
    I UPDATED JAVA:
    Java for Mac OS X 10.5 Update 9
    http://support.apple.com/kb/HT4438
    also
    JavaEmbeddingPlugin 0.9.7.5
    I have a PPC G5 dual 2.0
    OSX 10.5.8
    Firefox 3.6.16

  • How do I make my Firefox 3.6 run faster on my Mac OSX 10.4?

    My browser runs very sluggish these days. Tried to download
    Firefox 4, but could not on this version of Mac. Seems I'm
    stuck with the 3.6 browser. Any suggestion on how to make
    it run a little faster?

    See our knowledge base article [[How to set the home page]] to learn how you can set the home page to your liking (including restoring it to the default page).
    Unrelated to your issue, it looks like you're using a very old version of Firefox. You should upgrade to the latest version -- just go to the Help menu and click Check for Updates. This link walks you through the process: [[Updating Firefox]]

  • Can I use the citrix metaframe to run windows applications on Mac OSX?

    Sorry if I put this in the wrong forum, but I was wondering, if I could use the citrix metaframe to run Windows apps in OSX. Thanks in advance for the help!

    Nope.

  • Help please - Flash install fails on Mac OSX 10.9.5

    Installing Version 16.0.0.235 for Firefox on Mac runnng OS X 10.9.5
    A brief glimpse of white progress bar at 0% appears then dissapears from the grey install screen when you run the install. The grey box then just sits there.
    I have followed all the troubleshooting advice. I have de-installed flash then rebooted and tried again. I have done this twice just to make sure, but to no avail?
    Has anyone got any ideas?

    That is correct Das_Sad.  CS2 will not run on Intel based processors under Mac OS.  You will need to find a Mac computer with a PowerPC processor if you wish to run Creative Suite 2.

Maybe you are looking for

  • How do I remove credit card info?

    I want to remove credit card info from my account. How do I do that?

  • 23" ACD with pink in upper right quarter of screen, live with it?

    I've got a week 28 ACD that arrived as a portion of my not-yet-shipping Mac Pro order. From what I understand this is the new spec version (it certainly is very bright with vivid colors). I've been using it for about a week and can't shake the notion

  • How do i copy movie dvd in terminal

    i've found over my many years of using computers how powerful the command line is, especially in unix and linux, so i think this is possible. i also have the same videp in .mp4, and that may be easier to encode to dvd compatible format and burn a dvd

  • Is this the fastest way to copy files?

    I'm looking for a way to take 1 file and make many copies of it. Is this fastest way you know of? import java.io.*; import java.nio.channels.*; public static void applyFiles( File origFile, File[] files )   FileInputStream f1 = new FileInputStream( o

  • Problem user exit PCSD0001

    I'm creating a Bom Material (tr. CS01). I need to recover the list material in the user exit PCSD0001. I try with the table (SAPLCSDI)STPOB but it's empty. Any suggestion ? Thanks.