 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> 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'};
So instead of this:
char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
....and after adding the same include in parser_strings.cpp, I used:
const ssize_t n = strlen(Get_Token_String(CYLINDER_TOKEN));
char tmp_compound[4 + n];
And still error messages from the same line not eval to const also tried with
const int n = strlen(Get_Token_String(CYLINDER_TOKEN));
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > 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'};
>
> So instead of this:
> char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
>
> ....and after adding the same include in parser_strings.cpp, I used:
>
> const ssize_t n = strlen(Get_Token_String(CYLINDER_TOKEN));
> char tmp_compound[4 + n];
>
> And still error messages from the same line not eval to const also tried with
> const int n = strlen(Get_Token_String(CYLINDER_TOKEN));
two points. the 'strlen()' function returns a 'size_t', that is, an unsigned
value, while both 'int' and 'ssize_t' hold signed values; however, if that was
the problem you would have seen "warning: conversion to..." messages, not
errors.
second, I just downloaded 'Hg.226.Bigarade' and built it; one single warning
message aside, the program builds cleanly (on a Slackware GNU/Linux box). so,
sorry, cannot help any further, but my advice is: either create a virtual
machine running a Linux, or install 'cygwin'[*], or explore whether the Windows
10/Ubuntu thing works for you.
(I read the following quote in someone's signature block years back
(paraphrased): "computers are like air-conditioning, they stop working when you
open Windows." ;-))
[*] there are other s/wares too, like 'MinGW'.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > "jr" <cre### [at] gmail com> wrote:
> > > 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'};
> >
> > So instead of this:
> > char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
> >
> > ....and after adding the same include in parser_strings.cpp, I used:
> >
> > const ssize_t n = strlen(Get_Token_String(CYLINDER_TOKEN));
> > char tmp_compound[4 + n];
> >
> > And still error messages from the same line not eval to const also tried with
> > const int n = strlen(Get_Token_String(CYLINDER_TOKEN));
>
> two points. the 'strlen()' function returns a 'size_t', that is, an unsigned
> value, while both 'int' and 'ssize_t' hold signed values; however, if that was
> the problem you would have seen "warning: conversion to..." messages, not
> errors.
>
> second, I just downloaded 'Hg.226.Bigarade' and built it; one single warning
> message aside, the program builds cleanly (on a Slackware GNU/Linux box). so,
> sorry, cannot help any further, but my advice is: either create a virtual
> machine running a Linux, or install 'cygwin'[*], or explore whether the Windows
> 10/Ubuntu thing works for you.
>
> (I read the following quote in someone's signature block years back
> (paraphrased): "computers are like air-conditioning, they stop working when you
> open Windows." ;-))
>
> [*] there are other s/wares too, like 'MinGW'.
>
>
> regards, jr
Sorry since my purpose is blender exporter use. I can't afford to not be cross
platform
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> ... I can't afford to not be cross platform
you know that POV-Ray builds, you know that Hg is derived from the same sources.
it would be a lot of work, but if you worked through the differences in the
sources, perhaps aided by single-stepping (with debugger) through POV-Ray
execution, you could (likely) find out exactly what
'Get_Token_String(CYLINDER_TOKEN)' returns, and what else matters at that point
in the code. sorry to be of little/no help.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > ... I can't afford to not be cross platform
>
> you know that POV-Ray builds, you know that Hg is derived from the same sources.
> it would be a lot of work, but if you worked through the differences in the
> sources, perhaps aided by single-stepping (with debugger) through POV-Ray
> execution, you could (likely) find out exactly what
> 'Get_Token_String(CYLINDER_TOKEN)' returns, and what else matters at that point
> in the code. sorry to be of little/no help.
>
>
> regards, jr.
I had tried but could not find 'Get_Token_String(CYLINDER_TOKEN)' used in the
same context in POV-Ray trunk source, I may have searched wrong.
Just trying to help would already be a lot! besides I do have the impression
that you did unlock a few a step forwards. thanks !
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > ... I can't afford to not be cross platform
> >
> > you know that POV-Ray builds, you know that Hg is derived from the same sources.
> > it would be a lot of work, but if you worked through the differences in the
> > sources, perhaps aided by single-stepping (with debugger) through POV-Ray
> > execution, you could (likely) find out exactly what
> > 'Get_Token_String(CYLINDER_TOKEN)' returns, and what else matters at that point
> > in the code. sorry to be of little/no help.
>
> I had tried but could not find 'Get_Token_String(CYLINDER_TOKEN)' used in the
> same context in POV-Ray trunk source, I may have searched wrong.
> Just trying to help would already be a lot! besides I do have the impression
> that you did unlock a few a step forwards. thanks !
thanks for the .. vote of confidence. (flattery will get you anywhere.. :-))
I've created two 'tags' files with the symbols/names used in the sources.
searching them for 'Get_Token' gives me:
jr@swift:1:tmp$ xzgrep -n Get_Token hg_tags.xz
46500:Get_Token
povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 317;" f
class:pov_parser::Parser
46501:Get_Token_String
povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 1701;" f
class:pov_parser::Parser
jr@swift:2:tmp$ xzgrep -n Get_Token pov_tags.xz
45379:Get_Token povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp
210;" f class:pov_parser::Parser
45380:Get_Token_String
povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp 877;" f
class:pov_parser::Parser
jr@swift:3:tmp$
you can download the listings from here:
<https://drive.google.com/file/d/10RaLHKnogRE6ikkiaybHMP4d8ezyZfH9/view?usp=sharing>
<https://drive.google.com/file/d/10ThvgvOXlnSnHJrlAVdiV1UF1fcRpAIZ/view?usp=sharing>
they're about 20M each, so I have used 'xz' to compress, you can use 'WinRAR' to
uncompress if you don't have an 'unxz' installed.
regards, jr.
(reply via email if you feel this discussion is a bit off-topic)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"jr" <cre### [at] gmail com> wrote:
> hi,
>
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > "jr" <cre### [at] gmail com> wrote:
> > > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > > ... I can't afford to not be cross platform
> > >
> > > you know that POV-Ray builds, you know that Hg is derived from the same sources.
> > > it would be a lot of work, but if you worked through the differences in the
> > > sources, perhaps aided by single-stepping (with debugger) through POV-Ray
> > > execution, you could (likely) find out exactly what
> > > 'Get_Token_String(CYLINDER_TOKEN)' returns, and what else matters at that point
> > > in the code. sorry to be of little/no help.
> >
> > I had tried but could not find 'Get_Token_String(CYLINDER_TOKEN)' used in the
> > same context in POV-Ray trunk source, I may have searched wrong.
> > Just trying to help would already be a lot! besides I do have the impression
> > that you did unlock a few a step forwards. thanks !
>
> thanks for the .. vote of confidence. (flattery will get you anywhere.. :-))
>
> I've created two 'tags' files with the symbols/names used in the sources.
> searching them for 'Get_Token' gives me:
>
> jr@swift:1:tmp$ xzgrep -n Get_Token hg_tags.xz
> 46500:Get_Token
> povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 317;" f
> class:pov_parser::Parser
> 46501:Get_Token_String
> povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 1701;" f
> class:pov_parser::Parser
> jr@swift:2:tmp$ xzgrep -n Get_Token pov_tags.xz
> 45379:Get_Token povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp
> 210;" f class:pov_parser::Parser
> 45380:Get_Token_String
> povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp 877;" f
> class:pov_parser::Parser
> jr@swift:3:tmp$
>
> you can download the listings from here:
>
> <https://drive.google.com/file/d/10RaLHKnogRE6ikkiaybHMP4d8ezyZfH9/view?usp=sharing>
> <https://drive.google.com/file/d/10ThvgvOXlnSnHJrlAVdiV1UF1fcRpAIZ/view?usp=sharing>
>
> they're about 20M each, so I have used 'xz' to compress, you can use 'WinRAR' to
> uncompress if you don't have an 'unxz' installed.
>
>
> regards, jr.
>
> (reply via email if you feel this discussion is a bit off-topic)
The solution from this page seems to bring me a step further:
https://stackoverflow.com/questions/33423502/expression-did-not-evaluate-to-a-constant-c
so...
char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
becomes
char* tmp_compound = new char[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
Now I'm left with new lnk errors of "unresolved external symbols"(?) in
povcore64d.lib(tracepixel.obj)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> "jr" <cre### [at] gmail com> wrote:
> > hi,
> >
> > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > "jr" <cre### [at] gmail com> wrote:
> > > > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > > > ... I can't afford to not be cross platform
> > > >
> > > > you know that POV-Ray builds, you know that Hg is derived from the same
sources.
> > > > it would be a lot of work, but if you worked through the differences in the
> > > > sources, perhaps aided by single-stepping (with debugger) through POV-Ray
> > > > execution, you could (likely) find out exactly what
> > > > 'Get_Token_String(CYLINDER_TOKEN)' returns, and what else matters at that
point
> > > > in the code. sorry to be of little/no help.
> > >
> > > I had tried but could not find 'Get_Token_String(CYLINDER_TOKEN)' used in the
> > > same context in POV-Ray trunk source, I may have searched wrong.
> > > Just trying to help would already be a lot! besides I do have the impression
> > > that you did unlock a few a step forwards. thanks !
> >
> > thanks for the .. vote of confidence. (flattery will get you anywhere.. :-))
> >
> > I've created two 'tags' files with the symbols/names used in the sources.
> > searching them for 'Get_Token' gives me:
> >
> > jr@swift:1:tmp$ xzgrep -n Get_Token hg_tags.xz
> > 46500:Get_Token
> > povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 317;" f
> > class:pov_parser::Parser
> > 46501:Get_Token_String
> > povray-3.8.0.alpha-Hg.226.Bigarade/source/parser/parser_tokenizer.cpp 1701;" f
> > class:pov_parser::Parser
> > jr@swift:2:tmp$ xzgrep -n Get_Token pov_tags.xz
> > 45379:Get_Token povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp
> > 210;" f class:pov_parser::Parser
> > 45380:Get_Token_String
> > povray-3.8.0-alpha.10064268/source/parser/parser_tokenizer.cpp 877;" f
> > class:pov_parser::Parser
> > jr@swift:3:tmp$
> >
> > you can download the listings from here:
> >
> >
<https://drive.google.com/file/d/10RaLHKnogRE6ikkiaybHMP4d8ezyZfH9/view?usp=sharing>
> >
<https://drive.google.com/file/d/10ThvgvOXlnSnHJrlAVdiV1UF1fcRpAIZ/view?usp=sharing>
> >
> > they're about 20M each, so I have used 'xz' to compress, you can use 'WinRAR' to
> > uncompress if you don't have an 'unxz' installed.
> >
> >
> > regards, jr.
> >
> > (reply via email if you feel this discussion is a bit off-topic)
>
>
> The solution from this page seems to bring me a step further:
>
https://stackoverflow.com/questions/33423502/expression-did-not-evaluate-to-a-constant-c
>
> so...
> char tmp_compound[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
> becomes
> char* tmp_compound = new char[4+strlen(Get_Token_String(CYLINDER_TOKEN))];
>
Hi, I went on trying:
....Then removing deprecated binary_function following this page helped me clear
the next issue:
https://stackoverflow.com/questions/22386882/why-have-unary-function-binary-function-been-removed-from-c11
So in compare_pointees.hpp line 36 may become:
struct equal_pointees_t {
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
{ return equal_pointees(x,y) ; }
typedef OptionalPointee first_argument_type;
typedef OptionalPointee second_argument_type;
typedef bool result_type;
} ;
And line 61:
struct less_pointees_t {
bool operator() ( OptionalPointee const& x, OptionalPointee const& y ) const
{ return less_pointees(x,y) ; }
typedef OptionalPointee first_argument_type;
typedef OptionalPointee second_argument_type;
typedef bool result_type;
} ;
However in function _template.hpp, line 662 should also change:
, public std::function<T0,R>
and line 666:
, public std::function<T0,T1,R>
but to what?
(using CLANG-cl compiler in MSVS2019 from its internal installer, and ISO C++ 17
language version
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
hi,
"Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > "jr" <cre### [at] gmail com> wrote:
> > > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > > "jr" <cre### [at] gmail com> wrote:
> > > > > "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
> > > > > > ... I can't afford to not be cross platform
> > > > > ...
> Hi, I went on trying:
> ...
> However in function _template.hpp, line 662 should also change:
> , public std::function<T0,R>
> and line 666:
> , public std::function<T0,T1,R>
> but to what?
uh, sorry, no idea, this is way into C++ territory. hopefully JG, or someone
else with the required language skills, can help.
regards, jr.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On 10/3/20 7:20 PM, Mr wrote:
> "Mr" <mauriceraybaud [at] hotmail dot fr>> wrote:
...
> (using CLANG-cl compiler in MSVS2019 from its internal installer, and ISO C++ 17
> language version
>
The code to which you are pointing is not familiar to me.
Have you tried compiling with the compiler flag '-std=c++11' ?
For windows compiles, the libraries necessary are in the libraries
directory. In the official POV-Ray code base these have not been updated
in a long time. Further, the POV-Ray base code is only ensured to work
with c++11.
In what state you might find the libraries directory in hgpovray38 I do
not know. Jerome was a Ubuntu user last I knew.
On unix/linux based systems the libraries are install-able based upon a
release of whatever version of unix/linux/osx one runs. Therefore these
libraries will work (are supposed to work) with the default c/c++
compiler version shipped. Compiles in the unix/linux/osx environments do
not use the libraries directory.
The g++ default for Ubuntu 18.04.1 and 20.04.1 to which I just upgraded
is c++14. I also set -std=c++11 occasionally to test I have not
introduced something code wise which will not compile at that standard.
In doing that for povr, I'm pretty sure POV-Ray itself still OK at c++11.
I've also played with compiles using -std=c++17, but these don't compile
on 18.04 systems because the Ubuntu 18.04 'libraries' are not compatible
with c++17(1). A hint the even older libraries directory versions likely
are not.
(1) I've not yet tried a -stdc++17 compile on Ubuntu 20.04.1 - in part
because I've been busy these past few days cleaning up new warnings in
the povr code base I now see in the Ubuntu 20.04.1 environment!
My upfront guess is the windows libraries directory is out of date for
the environment in which you are compiling. Give -std=c++11 a try. If
you're lucky, let us know.
Bill P.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |