yafray-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Yafray-devel] Compiling yafray, error in basictex.cc


From: Mathias Wein
Subject: Re: [Yafray-devel] Compiling yafray, error in basictex.cc
Date: Thu, 08 Feb 2007 14:47:47 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20070103)

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
address@hidden
http://lists.nongnu.org/mailman/listinfo/yafray-devel

Also, the 'int character' may not work either with '.'


_______________________________________________
Yafray-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/yafray-devel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]