Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ellevy12

macrumors newbie
Original poster
May 5, 2007
12
1
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 !

Elad.
 

kpua

macrumors 6502
Jul 25, 2006
294
0
Don't choose "Empty Project"
in the New Project setup. Choose "C++ Tool"
 

peterjhill

macrumors 65816
Apr 25, 2002
1,095
0
Seattle, WA
Xcode
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.

Peter
 

krisvdc

macrumors newbie
May 5, 2007
2
0
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.

Regards,

Kris
 

ellevy12

macrumors newbie
Original poster
May 5, 2007
12
1
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 ?
 

krisvdc

macrumors newbie
May 5, 2007
2
0
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 :)
 

ellevy12

macrumors newbie
Original poster
May 5, 2007
12
1
OK
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
Elad
 

peterjhill

macrumors 65816
Apr 25, 2002
1,095
0
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.

http://www.macromates.com/

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

aaronbrethorst

macrumors member
Feb 1, 2007
30
0
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.

http://www.macromates.com/

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

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!
Aaron
 

AussieSusan

macrumors member
May 29, 2006
54
0
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.

Susan
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.