Build fails on Win11 + VS2022
Running build.bat there are 2 warning and 2 errors. Sample error:
termbench.cpp:286:43: error: constant expression evaluates to 17179869184 which cannot be narrowed to type 'size_t' (aka 'unsigned int') [-Wc++11-narrowing]
{"ManyLine", ManyLine, {1*Meg, 1*Gig, 16*Gig}},
^~~~~~
termbench.cpp:286:43: note: insert an explicit cast to silence this issue
{"ManyLine", ManyLine, {1*Meg, 1*Gig, 16*Gig}},
^~~~~~
static_cast<size_t>( )
How do you build termbench on Win11 + VS2022? Thx.
This looks like you are using the 32-bit compiler. Use the 64-bit compiler instead.
We can probably just force that value to be a 64-bit value, though, and this would work even on the 32-bit compiler, so, that might be a good idea...
- Casey
Using the 64-bit compiler worked. No errors. Thx!
I'm going to leave this issue open until I have a chance to check the codebase, though. I believe there is no real reason why the code can't work in 32-bit mode with some slight modifications, so I may just go ahead and do that to avoid requiring a 64-bit compiler for no real reason.
- Casey