Deuss Mario | 7 Mar 2007 01:18
Picon

RE: Compiling yafray, error in basictex.cc


 Hi there.

I'll give it another try, because I have some time now. I changed the code in basictex.cc acording to lynx, it
works now, thanks.
The next problem is the OpenEXR-library. First, Visual Studio tells me, it is mac-formated:

E:\YafraySource\yafray>scons
scons: Reading SConscript files ...
Using config file: config.h
scons: done reading SConscript files.
scons: Building targets ...
cl /DWIN32 /D_WIN32 /D_USE_MATH_DEFINES /EHsc /DHAVE_CONFIG_H /Ogitypb1 /Gs /MD
/D_STATIC_CPPLIB /DBUILDING_YAFRAYCORE /Isrc\yafraycore /I. /IE:\YafraySource\li
bs\msvc\zlib\include /IE:\YafraySource\libs\msvc\openexr_static\include\OpenEXR
/IE:\YafraySource\libs\msvc\pthreads\include /c src\yafraycore\EXR_io.cc /Fosrc\
yafraycore\EXR_io.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'Og' has been deprecated and will be re
moved in a future release
cl : Command line warning D9002 : ignoring unknown option '/Op'
EXR_io.cc
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImfOutputFile.h : error
 C4335: Mac file format detected: please convert the source file to either DOS o
r UNIX format
scons: *** [src\yafraycore\EXR_io.obj] Error 2
scons: building terminated because of errors.

Well then, my approach was to take Visual Studio and convert all files to windows-format. Now I get a lot of
errors in the EXR-library, I added the error as a txt file to this mail. May theres a more efficent way of
changing the format then by hand with VS?

Has anybody compiled the current yafray with VisualStudio 2005 before?  

           thx for helping, Mario

-----Original Message-----
From: yafray-devel-bounces+mdeuss=student.ethz.ch <at> nongnu.org on behalf of Laurence Mehlhorn
Sent: Thu 2/8/2007 5:06 PM
To: Yafray development mailing list
Subject: Re: [Yafray-devel] Compiling yafray, error in basictex.cc

I think User interation is good, It alows for creativity,
  What about Partical Rendering, So It can be used in the Game engine?.
  And other game engines.
  L.m

Mathias Wein <lynx <at> aspect-design.de> wrote:
  Hi,

const char *ext = strrchr(filename, '.');
should indeed be correct, if load_jpeg produces errors it has nothing to do
with the ext pointer...if you tell me the error, i could probably help you.
Right now i don't see anything obvious there...

casting away a const is rarely a good idea...and you can cast '.' to int and
back just fine...

> Deuss Mario wrote:
>> Hi there,
>>
>> as I got very interested in the topic of photorealistic rendering and 
>> raytracing in a course at my university, I want
>> to take a closer look on yafray. First step would be to compile the 
>> source, but I get problems with "line 262 in basictex.cc":
>>
>> char *ext = strrchr(filename, '.');
>>
>> I`m compiling it with visual studio 2005, and get the error:
>> cl : Command line warning D9035 : option 'Og' has been deprecated and 
>> will be re
>> moved in a future release
>> cl : Command line warning D9002 : ignoring unknown option '/Op'
>> basictex.cc
>> src\shaders\basictex.cc(262) : error C2440: 'initializing' : cannot 
>> convert from
>> 'const char *' to 'char *'
>> Conversion loses qualifiers
>> scons: *** [src\shaders\basictex.obj] Error 2
>> scons: building terminated because of errors.
>>
>> As I look up a reference on strrchr, this error makes sense, because 
>> filename is a const char*:
>>
>> at http://www.cplusplus.com/reference/clibrary/cstring/strrchr.html, 
>> strrchr is declared as following:
>>
>> const char * strrchr ( const char * str, int character );
>> char * strrchr ( char * str, int character );
>>
>> I tried to add a const: "const char *ext = strrchr(filename, '.');" 
>> but then I get errors with the jpeg_librabry.
>>
>> To keep it short, I would just be happy, if someone could tell me 
>> what to do to get it compiled.
>> thanks, Mario
>>
>>
>> _______________________________________________
>> Yafray-devel mailing list
>> Yafray-devel <at> nongnu.org
>> http://lists.nongnu.org/mailman/listinfo/yafray-devel
>>
>> 
> Also, the 'int character' may not work either with '.'
>
>
> _______________________________________________
> Yafray-devel mailing list
> Yafray-devel <at> nongnu.org
> http://lists.nongnu.org/mailman/listinfo/yafray-devel

_______________________________________________
Yafray-devel mailing list
Yafray-devel <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/yafray-devel

E:\YafraySource\yafray>scons
scons: Reading SConscript files ...
Using config file: config.h
scons: done reading SConscript files.
scons: Building targets ...
cl /DWIN32 /D_WIN32 /D_USE_MATH_DEFINES /EHsc /DHAVE_CONFIG_H /Ogitypb1 /Gs /MD
/D_STATIC_CPPLIB /DBUILDING_YAFRAYCORE /Isrc\yafraycore /I. /IE:\YafraySource\li
bs\msvc\zlib\include /IE:\YafraySource\libs\msvc\openexr_static\include\OpenEXR
/IE:\YafraySource\libs\msvc\pthreads\include /c src\yafraycore\EXR_io.cc /Fosrc\
yafraycore\EXR_io.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line warning D9035 : option 'Og' has been deprecated and will be re
moved in a future release
cl : Command line warning D9002 : ignoring unknown option '/Op'
EXR_io.cc
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImfName.h(205) : warnin
g C4996: 'strncpy' was declared deprecated
        D:\VSStudio05\VC\INCLUDE\string.h(156) : see declaration of 'strncpy'
        Message: 'This function or variable may be unsafe. Consider using strncp
y_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online he
lp for details.'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\IexBaseExc.h(259) : err
or C2504: 'base' : base class undefined
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\IexBaseExc.h(263) : err
or C2614: 'Iex::name' : illegal member initialization: 'base' is not a base or m
ember
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\IexBaseExc.h(265) : err
or C2614: 'Iex::name' : illegal member initialization: 'base' is not a base or m
ember
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\IexBaseExc.h(267) : err
or C2614: 'Iex::name' : illegal member initialization: 'base' is not a base or m
ember
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(493)
 : see reference to class template instantiation 'Imath::Vec2<T>' being compiled

E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(879)
 : see reference to class template instantiation 'Imath::Vec3<T>' being compiled

E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(965)
 : see reference to class template instantiation 'Imath::Vec2<T>' being compiled

        with
        [
            T=short
        ]
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(977) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(977) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(977) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(977) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(995) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(995) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(995) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(995) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1013
) : see reference to class template instantiation 'Imath::Vec2<T>' being compile
d
        with
        [
            T=int
        ]
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(437) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1025) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1025) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1025) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1025) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1043) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1043) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1043) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1043) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1061
) : see reference to class template instantiation 'Imath::Vec3<T>' being compile
d
        with
        [
            T=short
        ]
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1073) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1073) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1073) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1073) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1091) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1091) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1091) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1091) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1109
) : see reference to class template instantiation 'Imath::Vec3<T>' being compile
d
        with
        [
            T=int
        ]
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(815) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(823) : error
 C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1121) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1121) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1121) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1121) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1139) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1139) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1139) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1139) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1803) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1803) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1803) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1803) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1877) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1877) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1877) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(1877) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2635) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2635) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2635) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2635) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2713) : erro
r C2039: 'MathExc' : is not a member of 'Iex'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2713) : erro
r C2146: syntax error : missing ')' before identifier 'MathExc'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2713) : erro
r C3646: 'MathExc' : unknown override specifier
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(2713) : erro
r C2059: syntax error : ')'
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : error
 C2039: 'MathExc' : is not a member of 'Iex'
        E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImfRgbaFile.h(1
93) : see reference to class template instantiation 'Imath::Vec2<T>' being compi
led
        with
        [
            T=float
        ]
E:\YafraySource\libs\msvc\openexr_static\include\OpenEXR\ImathVec.h(429) : fatal
 error C1003: error count exceeds 100; stopping compilation
scons: *** [src\yafraycore\EXR_io.obj] Error 2
scons: building terminated because of errors.
_______________________________________________
Yafray-devel mailing list
Yafray-devel <at> nongnu.org
http://lists.nongnu.org/mailman/listinfo/yafray-devel

Gmane