POV-Ray : Newsgroups : povray.unofficial.patches : Hgpovray38, current state : Re: Hgpovray38, current state Server Time
21 Apr 2024 06:43:52 EDT (-0400)
  Re: Hgpovray38, current state  
From: Mr
Date: 3 Jun 2020 09:50:01
Message: <web.5ed7aa0db933d8376adeaecb0@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > ...
> > > > 8>..\..\source\parser\parser.cpp(12022): error C2065: 'ssize_t' :
> > ...
> > > you can fix the ssize_t error by defining it as a signed integer such as
> > > int_least32_t
> >
> > I don't know if that was any sensible thing to do but, in parser.cpp, line 12022
> > and 12023 I made a few attempts at replacing "ssize_t"
> >
> > ssize_t idx1 = std::min(Local_Vector[0], Local_Vector[1]);
> > ssize_t idx2 = std::max(Local_Vector[0], Local_Vector[1]);
> >
> > First by "int_least32_t" and then by "unsigned int" and finally "int_least64_t",
> > but every time only got an  error "conversion de 'size_t' en 'int', perte

> > processor machine.
> >
> > Any further advice?
>
> taking that error (from clean source, I assume) means that, for some reason, no
> header is included which provides 'ssize_t'.  after a quick look on my system, I
> think including 'unistd.h' would do.  alternatively, you could, at the top of
> whichever .cpp file, add a definition (ideally with a '#ifndef' guard) like:
>   #define ssize_t int
>
> POSIX guarantees a max of 32767, I think.
>
> hth.
>
>
>
> regards, jr.

Thanks
I tried all manners of include suggested to no success... However, this seemed
to do it for me, added after line 47 of parser.cpp below #include <algorithm> :


#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
#endif


Now I have another error, Which I boldly assume unrelated:
line 479  expression not evaluated to constant:
char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
as well as "Impossible d'utiliser 'this' dans une expression constante" (for the
same line)

web search brings me here:
https://docs.microsoft.com/fr-fr/cpp/error-messages/compiler-errors-1/compiler-error-c2131?view=vs-2019

I interpret it as an incentive to initialize some variable or iterator index
beforehand? I am standing still in the dark waiting for your lights !


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.