Compilation training in xcode

I started using C ++ widely at school, and now my programs reach the point that they have more than 1 file (for example, a header, a driver, an implementation file). I don’t know enough about software development to understand or understand how to customize the build process by looking at Apple manuals. Can someone get me through how to compile a simple C ++ project with a header and two C ++ files in xcode? Should I create a makefile first?

+3
source share
3 answers

In Xcode:

  • Choose File → New Project ...
    • Mac OS X → → ( , ++, stdin/stdout, Cocoa)
    • "" "++ std++"
    • "..." .
  • . "" () . main.cpp . , , "", .
  • → ...
    • ( .cpp), .
  • "" → " " .

Xcode, IDE. Xcode, , Cocoa. ++ Xcode Workspace Guide.

+6

, , :

, ++ Command Line Tool, , .

, make , Xcode , , ( ), " ", , , , " " " " , main.cpp , .

- , Xcode , "build" .

, GCC (, , , ), , xcode. . , , . , , , " " "build" , , , get info "build" , , .

xcode, , , , - ( ), , , .

+1

If you created a C ++ project in xcode, you should be right to just click "build" - there is no need for makefile tweedling ...

0
source

Source: https://habr.com/ru/post/1743090/


All Articles