1
votes

When I compile my XCode Code I get this at the bottom...Im not sure whats wrong?...I am coding in C++

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:52:12 UTC 2011) 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".tty /dev/ttys000 sharedlibrary apply-load-rules all [Switching to process 2627 thread 0x0] (gdb)

here is my code

#include <iostream>
#include <cmath>

int main ()
{
    using namespace std;

    double num1;
    num1 = pow (2.0,4.0);
    cout << num1 << endl;
    system("pause");
    return 0;
}
2
What's wrong with that? It all looks fine. I don't think pause is a command on most Macs, though.Carl Norum
@Carl Indeed, OS X does not have pause command.Etienne de Martel

2 Answers

2
votes

At a guess:

 system("pause");

causes the problem, as OS X may not have a "pause" command.

1
votes

That is some logging generated by the debugger, nothing to worry about.

The debugger is a process you can use to monitor your application at run time, if you haven't done any code optimization during compilation you can even change your code while your app is running.

If you don't want the debugger you can turn it off by changing the scheme in xcode.

Also the "pause" command does not ship with os X by default, is it something you made?