Compiling C with XCode 4

preview_player
Показать описание
This video shows how to open a XCode 4 project in order to compile a code written in C. When opening the project a sample code will appear on the file "Main.c", I did not modify this file, and it printed "Hello World!" on the screen (as it should have done).

Obviously if you want to write a larger code you can just open the file and drag it into the project folder.
This is useful mainly because it is very hard to find a C compiler for Mac, there is one made by Eclipse, but you have to install the library yourself, whereas after purchasing and installing XCode 4 you are ready to program in C.

I hope that it is clear enough, and one last thing: this is not supposed to be a C-Programming tutorial.
Рекомендации по теме
Комментарии
Автор

wow the best xcode video on C..no talking..hate when people talk more than they work..

maneesha
Автор

Thanks!! I was playing around with it and even though I went through similar procedures, I still ended up lost. Funny how helpful a little bit of instructions can be.

Mrliftalee
Автор

Thanks alot dude i have been having alot of problem with c. programming c /c++ is taught only for windows at scul no one teaches mac nd stuff. cause of that i had been having a lot of problems till now. thnx alot man 4 this awsome video

coolkysh
Автор

Helped me alot, taking a beginners course. Thanks!!!!

bigobrother
Автор

awesome! exactly what I need! Xcode so much better than codeblocks

ciclg
Автор

U just made my life so easy. Thanks a lot :)

simransidhu
Автор

@ciclg no problem! you could try also the C/C++ compiler from eclipse. However the major issue with it is that you have to install the C/C++ library manually (windows OS already has it by default and Mac OS has JAVA by default). But if you interested in JAVA as well you should check the Eclipse compiler.

bowlingfor
Автор

thanks for the video! Using it for the first time (version 3) and had hard time finding the output console to see the "hello world" text :D

Peccath
Автор

Gracias por tu ayuda! que Dios te Bendiga.
Tu video ha sido de gran ayuda para mi, ya que yo tenia que compilar en windows porque no sabia como hacerlo en mac.

trivibmxpro
Автор

for some reason the option to run the code isn't available. It lets me build it and tells me if it succeeded or not but it does not show the all output section like it does for you.

duo
Автор

Need some help.... when i create a new .c file within the same project the new file fails to build. Only the main.c is running successfully. How to create and execute multiple c files within a project?

Moonlighty
Автор

When I click on "show in finder" nothing happens. Any idea of what could be wrong?

ripsaw
Автор

This is exactly what I was looking for! I'm taking a class in C programming and I have a mac and needed a way to do stuff in C. I just have one question. My instructor says to add "system("pause");" or else the screen will disappear. For PC the screen disappeared. For Mac it did not. I guess that would mean I don't need that part... Should I worry?

TylerJamesLeonhardt
Автор

Thank you for this tutorial, but i have a question.

I am able to compile and output sucessfully simple code like "hello world!".
But as soon as start using scanf and writing code that interacts with the user, it doesn't work.
Why is this?

MrZampig
Автор

Thank you, but I have a problem, after running my first program in Xcode, I tried to do another, but it was not working, I create new file using command+N key, it s not working.would you help me :)

TheTASHu
Автор

@tylerl0706 From what I know "system("pause");" is more a C++ expression, I used to use another one (unfortunately I don't remember it anymore), but you usually want to use it on very small programs (containing very few functions), as some compilers will make the console disappear immediately after you run the code.
As you said, Xcode keeps your program up after it finished running, but if your instructor says to add it I would do it :P, simply because he is the one that is going to mark you :)

bowlingfor
Автор

@MacFixIt101 No worries! Thank You for watching :P

bowlingfor
Автор

was there audio to this thing? b/c i dont here anything.

ZOA
Автор

how did you remove the bundle identifier?

rmshredz
Автор

Program ended with exit code: 9   Is that ok?

beanman