Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing file include creates incomplete DLL export for IMemory.h/MemoryTracking.c #277

Open
vlmillet opened this issue Feb 23, 2023 · 0 comments

Comments

@vlmillet
Copy link

vlmillet commented Feb 23, 2023

MemoryTracking.c is not including IMemory.h, and then do not have the declaration of the tf_*_internal* functions. They are then seen as first declaration and definition and miss the FORGE_API macro which could export them.
I tried to include IMemory.h then, but it triggers macro/compilation errors with the #define of tf_malloc.
Anyway i guess the solution would be to create a shared include file which only have these declarations:

#ifdef __cplusplus
extern "C"
{
#endif
	FORGE_API bool initMemAlloc(const char* appName);
	FORGE_API void exitMemAlloc(void);

	FORGE_API void* tf_malloc_internal(size_t size, const char* f, int l, const char* sf);
	FORGE_API void* tf_memalign_internal(size_t align, size_t size, const char* f, int l, const char* sf);
	FORGE_API void* tf_calloc_internal(size_t count, size_t size, const char* f, int l, const char* sf);
	FORGE_API void* tf_calloc_memalign_internal(size_t count, size_t align, size_t size, const char* f, int l, const char* sf);
	FORGE_API void* tf_realloc_internal(void* ptr, size_t size, const char* f, int l, const char* sf);
	FORGE_API void  tf_free_internal(void* ptr, const char* f, int l, const char* sf);

#ifdef __cplusplus
}    // extern "C"
#endif

and which would be included in MemoryTracking.c and IMemory.h

@vlmillet vlmillet changed the title missing file include creates incomlete DLL export for IMemory.h missing file include creates incomplete DLL export for IMemory.h Feb 23, 2023
@vlmillet vlmillet changed the title missing file include creates incomplete DLL export for IMemory.h missing file include creates incomplete DLL export for IMemory.h/MemoryTracking.c Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant