Closed Profforgr closed 10 years ago
For lines 1564 and 1591, use the following:
if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
Im not sure what to do with the other error. I think one the GetLastError() functions has to be renamed to avoid these conflicts.
The default parameters in SFileReadFile (and in other APIs) were removed because of moving public StormLib interface to C only. Yes, Deaod's way is correct. As for the problem with GetLastError, I'll try to install Debian and try to reproduce the error. But generally, I think it's problem with C versus C++ declaration.
For lines 1564 and 1591, use the following:
if( SFileReadFile( SubFile, SubFileData, FileLength, &BytesRead, NULL ) )
Oh i am stupid. It works! Thanks.
Im not sure what to do with the other error. I think one the GetLastError() functions has to be renamed to avoid these conflicts.
As for the problem with GetLastError, I'll try to install Debian and try to reproduce the error. But generally, I think it's problem with C versus C++ declaration.
There was a function GetLastError defined in socket.h. It's just only in application i use. You can probably fix it my renaming GetLastError to something, but it'll break compability, so you should not do it.
I changed GetLastError in my application to Socket_GetLastError and now it works :)
Hello.
Note: in text 'you' = 'any StormLib developer'.
I am trying to use StormLib 9.0 in application called Ghost++ [ official repo: https://code.google.com/p/ghostplusplus/ ] to better handle MPQ archives (maps for Warcraft III), primary to open protected maps with this application (it`s a Bot for Warcraft III) [ so i need at least 8.0 by this changelog https://github.com/stormlib/StormLib/blob/master/doc/History.txt ]. Previous version 6.25 and it works like a charm for a years. I don't know why i don't see '6.25' in history, maybe it was dev version.
But i have an error in compile process of Ghost++ application [i compiled StormLib and Ghost++ on this machine; i am using Linux Debian, used Makefile.linux file for compilation and i am using gcc version 4.7.2 (Debian 4.7.2-5) compiler]. I have such errors (same) either with 9.0 and current dev version.
Not sure how to fix. Maybe you can make backward compability to this function (if possible)? Or just suggest what should i change, please.
Errors:
About first error:
It looks like, that C++ have such function already and it can not be reused by StormLib... Maybe do something like
as a replace of
Just guessing.
About second error:
I compared lines from StormLib.h:
9.0:
6.25:
As of my very tiny knowledges of C++ it looks like that you make two options 'pdwRead' and 'LPOVERLAPPED' mandatory. It it really must be added for function to work? Maybe change back to something like this?
Lines from files mentioned in error output: socket.h:83
ghost.cpp:1564
ghost.cpp:1591
Full function ExtractScripts() with these two lines:
Thanks in advance,
Alex.