This is not a real problem, because the compiler, when it searches for
a
file included from a .h file, should first look in the directory that
the
.h file lives in. Here's some gcc documentation on the issue from
http://gcc.gnu.org/onlinedocs/gcc-3.1.1/cpp/Search-Path.html:


This is true for some kinds of compilers, I believe for most of popular ones. But this behavior is implementation dependent, C++ standard does not say anything about it. CodeWarrior 8.3's searches for #include files in different way. It does not look into directory of file which contain #include or into directory of being compiled file, it uses paths as specified in Project Settings/Access Paths. Actually I had troubles when was trying to adopt Crypto++ in my project on Mac platform - I had header names ambiguities. Even they can be solved manually, why just not to update include style in the library, so this kind of problems will go away and nobody will wrestle with them?

-Aleksandr Furmanov
email: [EMAIL PROTECTED]



Reply via email to