View Single Post
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,322
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
What exactly does "compile without building" even mean? A quick primer on how this all works. A program can be comprised one one or multiple sources/header files..

If there is a single source file, it is first pre-processed by the compiler to evaluate all of the "#include", "#import", "#define", "#pragma" and other pre-processor directives. The file is then compiled into an object file, it is then finally linked against any necessary libraries to make it a functioning program.

The same process holds true for a project with multiple source files, you go through all the steps for each of the source files and deal with any cross-file dependencies as needed or report errors if things are messed up. Once it's all done, the final executable is created for execution.

Suppose you have a project with 3 source files, you modify one of them and then hit CMD+b, this will cause the compiler to determine which file changed, and go through the steps I described above and create the executable at that point. If you happen to do a CMD+r immediately after, the build will automatically run but since it's already up to date, nothing really happens except the message appearing and going to execute your program.

I'll have to check to see if there is a XCode option to prevent building when running, but that is usually a problem if you don't remember to build before you run.

Unless you are writing a VERY complicated program or running this on a Mac that is severely lacking in power, I can't imagine the few seconds it takes for the incremental builds or the minute it might take build the entire program is a huge deal.

I deal with building things that takes hours to complete so I know all about waiting..

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks