there is a warning that stops my program from being compiled. It comes from a header file, inside of my header file. And that header file is from third party. Is there a way to disable it so that the compilation goes successfully?
Asked
Active
Viewed 2,080 times
0
-
your program can't be successfully compiled if a header file is missing... – Daniel A. White Apr 03 '13 at 17:37
-
4I would think you *should* get a compiler error. Q: What happens if you create a dummy header file? Does it then complain about missing definitions? – paulsm4 Apr 03 '13 at 17:37
-
possible duplicate?? http://stackoverflow.com/questions/3308523/how-to-eliminate-external-lib-third-party-warnings-in-gcc http://stackoverflow.com/questions/1867065/how-to-suppress-gcc-warnings-from-library-headers – jsedano Apr 03 '13 at 17:37
-
2Just remove any mention of the missing header. If you are still getting errors, continue removing corresponding lines from the source, until it compiles cleanly. – n. m. could be an AI Apr 03 '13 at 17:37
2 Answers
1
if you are using Visual Studio, in the project properties-> C/C++ ->General settings there is a warning level item. you can set this to a lower value but it is a better practice to diminish such warnings by solving them, not by hiding because they may cause troubles in future.

fatihk
- 7,789
- 1
- 26
- 48
1
For missing header file you should get compile time error not a warning, and you need to provide that missing header file, if you introduce a new header file which is missing function declaration which original header file got, that will again generate compile time error as far as i see! So you would have to provide declaration of those functions also.

Saqlain
- 17,490
- 4
- 27
- 33