[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] use "" instead of <> for header?
From: |
Drew Hess |
Subject: |
Re: [Openexr-devel] use "" instead of <> for header? |
Date: |
Fri, 24 Feb 2006 18:17:51 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.5 (chestnut, linux) |
On platforms which use the GNU toolchain, you can use pkg-config so
that your search paths are automatically set properly for OpenEXR.
'man pkg-config' for details, but just for starters:
for compiling:
$ pkg-config --cflags OpenEXR
-I/usr/include/OpenEXR
for linking:
$ pkg-config --libs OpenEXR
-lIlmImf -lImath -lHalf -lIex -lz
Put `pkg-config --cflags OpenEXR` in your include paths in your
Makefiles and that should eliminate the pain of manually specifying
them.
d
Florian Kainz <address@hidden> writes:
> The C++ standard seems to say that, no matter if you include <foo>
> or "foo", where compiler looks for foo is implementation-defined, and
> "foo" may or may not behave the same way as <foo>. The behavior you
> want is not guaranteed. According to section 16.2:
>
> A preprocessing directive of the form
>
> #include <h-char-sequence> new-line
>
> searches a sequence of implementation-defined places for a header
> identified uniquely by the specified sequence between the < and >
> delimiters [...]
>
> A preprocessing directive of the form
>
> #include <q-char-sequence> new-line
>
> causes the replacement of that directive by the entire contents
> of the source file identified by the specified sequence between
> the " delimiters. The named source file is searched for in an
> implementation-defined manner if this search is not supported,
> or if the search fails, the directive is reprocessed as if it
> read
>
> #include <h-char-sequence> new-line
>
> [...]
>
>
> Kai-Uwe Behrmann wrote:
>> This is a request to exchange <> against "" in the public OpenEXR headers.
>> The header files distributed with OpenEXR include each other with
>> the //OpenEXR header file
>> #include <name_of_other_exr_header.h>
>> sheme. Thus the compiler searches in the global include search paths
>> for the files. With this variant I need to fully specify the path on
>> the compile line, which is extra work. I come with CinePaint
>> compilation regularily around this stone, and users as well. But I
>> think the OpenEXR headers should see each the other in a private
>> sense and not a global one.
>> Using "" instead would lead to searching in local paths:
>> // OpenEXR header file
>> #include "name_of_other_exr_header.h"
>> Now the compiler finds the other OpenEXR headers from a base include
>> path. There can reside many subdirectories which will be recognized,
>> like for OpenEXR, FL (FLTK) or libexif. Thus one could simply
>> include like follows in an application:
>> // my fancy app
>> #include <OpenEXR/ImfRgbaFile.h>
>> + use one base include path on the compiler line and everything just
>> works.
>> regards
>> Kai-Uwe Behrmann
>> + development for color management
>> + imaging / panoramas
>> + email: address@hidden
>> + http://www.behrmann.name
>> _______________________________________________
>> Openexr-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/openexr-devel
>>
>
>
> _______________________________________________
> Openexr-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/openexr-devel