Re: -isystem and local includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, do let me know if I am not describing the issue properly, so I can
provide more details.
There are solutions that involve altering the third-party library, but
that's not really acceptable. The solution needs to lie in the way my own
project is compiled and the way it includes the third-party library.

Cheer!


Zadirion wrote:
> 
> Hello fellow programmers,
> 
> I've come across an interesting dilemma:
> given the following project structure
> ./myproject/main.cpp
> ./thirdpartylib/source.cpp
> ./thirdpartylib/header.h
> 
> I need to ignore the warnings in the third party library. The warnings
> occur in header.h
> 
> now, source.cpp includes header.h this way: 
> #include "header.h"
> 
> Because of the way source.cpp includes the header, using -isystem
> ./thirdpartylib/ to avoid the warnings would be useless, because the
> compiler evaluates the normal includes before the system header includes,
> as specified in the gcc standard:
> http://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
> 
> I could place source.cpp and header.h in separate subfolders under
> ./thirdpartylib, then -isystem the header's subfolder. But that's not a
> viable long-term solution, since you don't want to be doing that to a
> third-party library that might be needing an update in the future.
> 
> Surely there must be a way to achieve this without altering the third
> party library in any way.
> The solution evades me, so any help would be appreciated!
> 
> Kind regards,
> Eddie
> 

-- 
View this message in context: http://old.nabble.com/-isystem-and-local-includes-tp30211832p30211868.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux