[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Openexr-devel] KDE meta-information plugin
From: |
Florian Kainz |
Subject: |
Re: [Openexr-devel] KDE meta-information plugin |
Date: |
Thu, 15 Jan 2004 09:25:43 -0800 |
Brad Hards wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thu, 15 Jan 2004 13:48 pm, Drew Hess wrote:
> > Looks pretty good. What problems are you having with
> > ImfStandardAttributes.h ?
>
> The header part of the code looks like:
> #include <stdlib.h>
> #include "kfile_exr.h"
> #include <ImathBox.h>
> #include <ImfInputFile.h>
> #include <ImfBoxAttribute.h>
> #include <ImfChannelListAttribute.h>
> #include <ImfCompressionAttribute.h>
> #include <ImfFloatAttribute.h>
> #include <ImfIntAttribute.h>
> #include <ImfLineOrderAttribute.h>
> #include <ImfStringAttribute.h>
> #include <ImfVecAttribute.h>
> #include <ImfStandardAttributes.h>
> #include <iostream>
>
> and when I compile, it errors out as follows:
>
> /bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H
> -I. -I. -I../.. -I/usr/local/kde/include
> -I/home/bradh/coding/cvs-vers/kde-head/qt-copy//include -I/usr/X11R6/include
> -I/usr/local/include/OpenEXR -DQT_THREAD_SUPPORT -D_REENTRANT
> -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith
> -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align
> -Wconversion -Wchar-subscripts -O2 -Wformat-security
> -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common
> -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT
> -DQT_NO_TRANSLATION -c -o kfile_exr.lo `test -f 'kfile_exr.cpp' || echo
> './'`kfile_exr.cpp
> In file included from /usr/local/include/OpenEXR/ImfChromaticities.h:47,
> from
> /usr/local/include/OpenEXR/ImfChromaticitiesAttribute.h:47,
> from /usr/local/include/OpenEXR/ImfStandardAttributes.h:60,
> from kfile_exr.cpp:47:
> /usr/local/include/OpenEXR/ImathMatrix.h:2335: warning: `inline' is not at
> beginning of declaration
> /usr/local/include/OpenEXR/ImathMatrix.h: In static member function `static
> void Imath::Matrix44<T>::multiply(const Imath::Matrix44<T>&, const
> Imath::Matrix44<T>&, Imath::Matrix44<T>&)':
> /usr/local/include/OpenEXR/ImathMatrix.h:2354: parse error before `=' token
> /usr/local/include/OpenEXR/ImathMatrix.h:2355: redeclaration of `const
> T*restrict'
> /usr/local/include/OpenEXR/ImathMatrix.h:2354: `const T*restrict' previously
> declared here
> /usr/local/include/OpenEXR/ImathMatrix.h:2355: declaration of `const
> T*restrict'
> /usr/local/include/OpenEXR/ImathMatrix.h:2354: conflicts with previous
> declaration `const T*restrict'
> /usr/local/include/OpenEXR/ImathMatrix.h:2355: parse error before `=' token
> /usr/local/include/OpenEXR/ImathMatrix.h:2356: conflicting types for
> `T*restrict'
> /usr/local/include/OpenEXR/ImathMatrix.h:2354: previous declaration as `const
> T*restrict'
> /usr/local/include/OpenEXR/ImathMatrix.h:2356: parse error before `=' token
>
> Brad
I think adding "-Drestrict=__restrict" to the compile line should fix
the problem. In a few places, ImathMatrix.h uses restricted pointers.
Restricted pointers are standard in C99. They are not officially part
of C++, but some compilers support them anyway. In g++, the keyword
for restricted pointers is "__restrict".
Florian
Re: [Openexr-devel] KDE meta-information plugin, Drew Hess, 2004/01/14