Where is this backward_warning.h #warning coming from?
Without looking through every single source file in my XCode project, is there a way to find out which #include is triggering the following warning?
#warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 188.8.131.52 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
Clicking on the error in XCode just opens the backward_warning.h file, which is totally useless.
I know what the warning means, I know how to fix it (when I see the file in question and can look at its #includes)… but I just don’t know how to find the file causing the error!
- Why is the Xcode compiler not warning me about invalid methods for my Deployment Target?
- I have 30 annotations, and growing. Looking for a simpler way to code this?
- facebook SDK3.1 and Xcode 4.5 linker error
- /developer directory is missing in Lion Xcode 4.3
- UIView two animations coexisting
- What does “-(void)” mean in this function declaration? `-(void)awakeFromNib`
3 Solutions Collect From Internet About “Where is this backward_warning.h #warning coming from?”
-H option to GCC – that will list the header files that are being included (along with a nesting indication so you can see what file is including which header).
-H the error will be placed in the output stream clearly showing how the compiler got to
For example, when I include
hash_map, I’d see:
mikeb@ubuntu:~$ g++ -H -c test.cpp . /usr/include/c++/4.4/backward/hash_map .. /usr/include/c++/4.4/backward/backward_warning.h In file included from /usr/include/c++/4.4/backward/hash_map:60, from test.cpp:3: /usr/include/c++/4.4/backward/backward_warning.h:28: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. ... a bunch of snipped output ...
As an aside,
/showIncludes performs the same function in MSVC.
As you stated, the file
contains the text you quote. The headers which include
Therefore, the code you are compiling must be including a header such as:
instead of the preferred:
And the compiler is getting fussy about it. The fix is to find the code which includes the pre-standard header and update it to use the standard header.
(You get similar warnings about deprecated functions if you compile
git – the functions are the SHA1 functions from OpenSSL. It is a nuisance, to be polite about it.)
You have an old style header somewhere.
something like this
#include <iostream.h> //instead of <iostream> #include <stdlib.h> //instead of <cstdlib> #include <stdio.h> //instead of <cstdio>
if it is included from a library then I think you are SOL, I personally wouldn’t rummage through a library to get it to work you will have to up date them to use namespaces. and other such.
- NSURLSession with NSBlockOperation and queues
- Changing Gregorian Month and Days names to Islamic? NSDate
- Cropping CIImage
- Is there any framework to highlight text on pdf file after rendering on the iphone
- CGContext and retina display
- Swift, Constraint, The view hierarchy is not prepared for the constraint
- Differences in simulator vs deployment on iPad
- how to say “same class” in a Swift generic
- How to calculate speed of our car using iphone
- Updating UILabel in the middle of a for() loop
- how to capture last 4 characters from NSString
- Mac OS X Facebook login failed – no stored remote_app_id for app
- Can I localize a UIDatePicker?
- NSMutableArray stored with core data = WORKS, but after changing array DOESN'T WORK
- Best way to stream MP3 from an iPhone app?