Thread: how come debugging anded normally when...

  1. #1
    Registered User
    Join Date
    Mar 2010

    how come debugging anded normally when...

    ... I deleted the #include <iostream>

    If I do the same thing within UNIX system with VI editor and try to compile I will get a lot of errors which is understandable.

    How I can solve this kind of issues in different Integrated Development Environment (IDE) or more specific Xcode?

    Means I would like my Xcode to be clever as the g++ in UNIX.


  2. #2
    Join Date
    Aug 2002
    Tucson, Arizona
    Why would you want to delete the header reference?

  3. #3
    Registered User
    Join Date
    Jan 2005
    She (or he) doesn't. I think the preference is that Xcode should output errors when such a mistake is made.

    The problem is that there are a lot of rules in C++ where the implementation (the compiler or library writers) are allowed to do different things. This is good in some ways because it lets them make decisions that lead to easier/faster/better implementations. The problem is that not all implementations do the same thing, and in some cases this leads to unintended results in your code.

    The best solution is to just not forget to put the header, and if your compiler does give errors, make sure you check your headers if the errors look like they may be caused by such a mistake.

  4. #4
    Registered User
    Join Date
    Jan 2010
    I have never used Xcode, but I know that MSVC has an option to list files to forcefully include in every source file (it's empty by default though). Maybe Xcode has a similar option?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dev-C++: Problems with Breakpoint Debugging
    By Thileepan_Bala in forum C Programming
    Replies: 1
    Last Post: 01-17-2008, 10:48 AM
  2. Problem in debugging in Eclipse
    By Bargi in forum Linux Programming
    Replies: 1
    Last Post: 08-21-2007, 09:53 AM
  3. Debugging Dev C++
    By tuurb046 in forum Tech Board
    Replies: 10
    Last Post: 08-16-2007, 12:51 PM
  4. gdb no debugging symbols found
    By Laserve in forum Linux Programming
    Replies: 8
    Last Post: 09-17-2006, 08:56 AM
  5. Debugging book recommendation
    By dagans in forum Projects and Job Recruitment
    Replies: 1
    Last Post: 09-13-2005, 07:35 PM