Boost logo

Boost Users :

Subject: Re: [Boost-users] [Preprocessor] Relative Addresses in BOOST_PP_FILENAME_1
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2011-01-23 18:10:11


AMDG

On 1/23/2011 1:37 PM, Hossein Haeri wrote:
>> It is because BOOST_PP_FILENAME_1 expands in a Boost PP
>> header file. In GCC a relative file name is relative only to
>> the file in which it is included. Since it is a Boost PP
>> header file that does the including, your relative header
>> file will not be found.
>>
>> In VC++ on Windows relative header files are relative to an
>> entire chain of header files being included to that point
>> from the source file on down, so a relative header file as
>> you have above would be found.
>
> Well, isn't this addressable in Boost PP?

No. Boost.PP can't change how the compiler
searches for headers.

> I mean, can Boost PP just not make its expansion compatible with this cross-compiler issue?
>
>> I ran into this same problem also and ended up just using a
>> non-relative name of the form<boost\myLibrary\myHeader.hpp> for all
>> compilers as the easiest solution.
>
> But, this requires my clients to copy my stuff under their local Boost directory, right?
>

No. That's just a specific example. You just need
to make sure that the header is in the compiler's
include path.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net