Jacemdom Posted September 6, 2006 Report Share Posted September 6, 2006 Salut. I now tried to import the functions from zlib.dll v1.2.3, and it does not work again... I attached the zlib kit if someone would like to try... Any suggestions? Download File:post-731-1157566500.zip Quote Link to comment
Godpheray Posted September 8, 2006 Report Share Posted September 8, 2006 Main reasons: 1) the tool find the definitions of "alloc_func" and "free_func" in the header file. 2) the tool cannot support "#define OF(args) ()" Walk around: 1) replace "alloc_func" and "free_func" with "int" 2) remove the "OF" macro Download File:post-6094-1157697620.zip Quote Link to comment
Jacemdom Posted September 12, 2006 Author Report Share Posted September 12, 2006 Main reasons: 1) the tool find the definitions of "alloc_func" and "free_func" in the header file. 2) the tool cannot support "#define OF(args) ()" Walk around: 1) replace "alloc_func" and "free_func" with "int" 2) remove the "OF" macro Could you explain more point #2? Quote Link to comment
Rolf Kalbermatter Posted September 14, 2006 Report Share Posted September 14, 2006 Could you explain more point #2? #defines are proeprocessor keywords and not part of the actual C compiler. Having a fully compliant proprocessor and a complete C compiler together in one single tool is a major undertaking getting you almost to the point of writing a complete C compiler (well at least the complete parser for it). THis is highly recursive and hard to implement so I guess the developers of the import shared library tool made a few decisions to restrict the parsing complexity. The used OF() macro is from the zlib header file and is used to work around some very old non C99 compatible compiler issues. There are not many compilers that need that anymore but the developers of zlib want to be compatible to as many compilers as possible. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.