[GLLUG] Reading/converting unknown database file
Alistair Mann
al at pectw.net
Sat Oct 5 10:55:48 UTC 2024
On 05/10/2024 10:18, Henrik Morsing via GLLUG wrote:
> On Wed, Sep 25, 2024 at 02:42:39PM +0100, John Southern via GLLUG wrote:
>> Is the Collectorz in the same format as CLZ? if so the there is a
>> decompressor at https://github.com/sukharah/CLZ-Compression
>>
>
> I tried, but with my usual luck:
>
> $ g++ -std=c++11 -iquote header "source/main.cpp" "source/CLZ.cpp"
> "source/CLZHashTable.cpp"
> source/CLZ.cpp: In function ‘void CLZ::pack2(std::ifstream&,
> std::ofstream&)’:
> source/CLZ.cpp:303:51: error: no matching function for call to
> ‘max(unsigned int, size_t&)’
> 303 | char* array = new char[std::max(16u, decomp_size)];
> | ^
>
>
> I'm not a developer, and certainly not in variants of C, so that will
> take me some time to decode.
max() here is a Windows macro - that code is expected to be compiled on
a Windows machine (indeed look further down the github at the
"program.exe" reference.) Given what you're trying to do it's probably
easier to oblige it than fix the programmer's code.
If you *did* want to try fixing it, or reading more, there's some useful
points at
https://stackoverflow.com/questions/25086999/stdmin-max-type-deduction-different-on-linux-and-windows
Cheers,
--
Alistair Mann
More information about the GLLUG
mailing list