POV-Ray : Newsgroups : povray.unofficial.patches : Hgpovray38, current state : Re: Hgpovray38, current state Server Time
28 Apr 2024 14:40:34 EDT (-0400)
  Re: Hgpovray38, current state  
From: jr
Date: 3 Jun 2020 11:25:00
Message: <web.5ed7c080b933d8374d00143e0@news.povray.org>
hi,
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > "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.
>
> 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

I had not realised you're on Redmond's finest.

I wonder whether using either the Linux "sub-system" supplied with Windows 10,
aiui, or an installation of 'cygwin', would not make all these errors/problems
go away.

<https://www.cygwin.com/>

> 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))];

one hack-ish workaround could be to separate out the operations, ie in C I might
do something like:

size_t const n = strlen(Get_Token_String(...));
char tmp_compound[4 + n] = {'\0'};

> 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 !

some "lights", more like a 15W bulb.  :-)  good luck.


regards, jr.


Post a reply to this message

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