xcode/c++ HELP plz :-(

Discussion in 'Mac Programming' started by ellevy12, May 5, 2007.

  1. ellevy12 macrumors newbie

    May 5, 2007
    hello. i am new to the mac and was doing c++ h.w. under dev cpp in the windows.

    now i am trying to figure out xcode and it's really bad :-(

    i had this project i was doing under dev cpp and i created a new , empty project in xcode, and dragged all the cpp and header files to the mac.

    i tried to build and run it , but it won't work.

    i sew that i need to build/make some target, but i dont know what it is and what should i make. i need somthing that runs to the command line like in windows, for a simple c++ course i am taking.

    please help !

  2. kpua macrumors 6502

    Jul 25, 2006
    Don't choose "Empty Project"
    in the New Project setup. Choose "C++ Tool"
  3. peterjhill macrumors 65816


    Apr 25, 2002
    Seattle, WA
    file menu
    new project
    command line utility
    c++ tool

    start there
    i'm not an SDE, so that is about as far as I can take you.

  4. krisvdc macrumors newbie

    May 5, 2007
    Add your files by : Project -> Add to project.

    And try not to overwrite the main.cpp, you beter copy paste your other main.cpp in it.

    Don't forget to disable the Build -> Allow zeroLink, when i started out with xcode, that caused some freaky results.


  5. ellevy12 thread starter macrumors newbie

    May 5, 2007
    what does the zero link means ??

    thanx for the advice guys, it helped, tough i am wondering what the targets means.

    do you know of other programs such as Xcode (and more like the nice easy dev c++) for programing c++ under mac os x ?
  6. krisvdc macrumors newbie

    May 5, 2007
    zerolink : http://developer.apple.com/document...en.lproj/bs_linking/chapter_34_section_9.html You don't really need to know what it is. It just ****ed up my c apps.

    I also code with vim and Makefile on other *nix-es. That's nice and easy ;)

    Targets :

    I made a new "Command Line utility" -> "C++ tool" with the name qdsf
    I change the "active build configuration" to "release", and "build and go"

    If I click on the qdsf executable in the project and "reveal in finder" i found a path like /User/kris/qdsf/build/Release/qdsf
    I cd to that in terminal and :

    pearl:~/qdsf/build/Release kris$ ./qdsf
    Hello, World!

    All done :)
  7. ellevy12 thread starter macrumors newbie

    May 5, 2007
    and what does building config means?
    in dev c++ i only clicked on build and relexed.
    what is the diffrence beatwean release and the other?

    thanX guys
  8. peterjhill macrumors 65816


    Apr 25, 2002
    Seattle, WA
    (again, not a developer)

    I super highly recommend that you check out textmate. I have been using it August 2005. It is a very powerful text editor. I like it much better than bbedit.


    It might not replace the editor in xcode, but I know a number of former vi and emacs users that are using textmate.
  9. aaronbrethorst macrumors member

    Feb 1, 2007
    Seattle, WA
    I'll echo Peter's comments. TextMate is fantastic, and you may be much better off with it than an IDE. I love IDEs, don't get me wrong (especially having worked on one for the past three years), but they can get in the way when you're just learning how to program.

    Good luck!
  10. AussieSusan macrumors member

    May 29, 2006
    Melbourne, Australia
    Take the time to learn about Xcode

    As you are finding out, Xcode is NOT Visual Studio.

    While not a solution to your immediate problems, I strongly suggest that you get one of the books available on developing under Xcode. These (typically) take you through the various steps and describe the purpose of the sources 'folders', targets, executables etc..

    Once you get the hang of the various concepts built into Xcode, then you will be able to do a lot with it, but my experience is that it has a fairly steep learning (or familiarity) curve. It can do everything I want it to, but i needed to learn how to talk to it in the way it was expecting.

    Taking a bit of time now will same you heaps of frustration later on.

  11. lorductape macrumors 6502


    Jun 23, 2006
    t3h usa
    or you could do what i did and get crossover mac and run devC++, arguably the best free compiler there is.
  12. Mr.Texor macrumors regular

    Apr 20, 2007

Share This Page