Con Xcode 3.2.5/6:Originariamente inviato da Chiarula
Era solo una domanda, anche perché con xcode non si può usare su un semplice file c.
File->New Project->Mac OS X->Application->Command Line Tool.
Se non vuoi creare un progetto in Xcode puoi cmq compilare e debuggare da linea di comando:
codice:$ gcc --version i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664) $ gdb --version GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Wed Sep 22 02:45:02 UTC 2010) $ gcc -g main.c $ gdb a.out GNU gdb 6.3.50-20050815 (Apple version gdb-1510) (Wed Sep 22 02:45:02 UTC 2010) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done (gdb) br main Breakpoint 1 at 0x100000f08: file main.c, line 4. (gdb) run Starting program: /Users/MacApp/development/console/test/simple_debug/a.out Reading symbols for shared libraries +. done Breakpoint 1, main () at main.c:4 4 printf ("Hello World!"); (gdb)

Rispondi quotando