Hi,
Thank you so much for your updated work on your compiler.
I'd like to report a bug in the new C compiler version 8.0 RC2.
Same code compiled fine with Pelles C version 7.0.x
I'm getting these errors:
error #3120: [asm] Symbol '_SzAlloc@8' is undefined.
error #3120: [asm] Symbol '_SzFree@8' is undefined.
My code to let you reproduce:
main.c:#include "Types.h"
#include "7zAlloc.h"
ISzAlloc allocImp;
ISzAlloc allocTempImp;
void doit(void)
{
allocImp.Alloc = SzAlloc;
allocImp.Free = SzFree;
}
Extract of Types.h:
typedef struct
{
void *(*Alloc)(void *p, size_t size);
void (*Free)(void *p, void *address); /* address can be 0 */
} ISzAlloc;
#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
#define IAlloc_Free(p, a) (p)->Free((p), a)
7zAlloc.h:
#ifndef _7Z_ALLOC_H
#define _7Z_ALLOC_H
#include <stdlib.h>
void *SzAlloc(void *p, size_t size);
void SzFree(void *p, void *address);
void *SzAllocTemp(void *p, size_t size);
void SzFreeTemp(void *p, void *address);
#endif
Everything is correctly defined. But I'm getting undefined symbol when compiling. Note that the code completion feature correctly detects SzAlloc and SzFree.
Hope this will help you to find the solution for this bug.
Note: source files come from the 7z LZMA SDK in public domain at
http://7-zip.orgThanks!
Guser