External linking in a static library
External linking in a static library
- Subject: External linking in a static library
- From: Pete Parks <email@hidden>
- Date: Wed, 03 Mar 2004 11:27:24 -0800
For some reason the compiler doesn't like my static library override of various memory calls on OS X. It is giving me the following error. Does anyone know why this works on a OS 9 Metrowerks compiler, but not on OS X XCode compiler?
Pete
Error from compiler:
=====================
../slk/lidil_encap/common/raster.cpp:153: implicit declaration of function `int XBow_free(...)'
../slk/lidil_encap/common/raster.cpp:207: implicit declaration of function `int XBow_malloc(...)'
Compiler Settings:
=====================
Other C Compiler Flags
-O3 -imacros ../preBuild.h
Global C compiler flags file preBuild.h
==========================================
#ifdef MACOS_OS10
// This is for taking over malloc, free, new and delete
#define MACOS_MEM
// This is for overriding the new operations of a class
//#define MACOS_MEM_XBOW
#ifdef MACOS_MEM
#include "XBowMem.h"
#ifdef __cplusplus
extern "C"
{
#endif
extern void *XBow_malloc(size_t byteSize);
extern void XBow_free(void *ptr);
#ifdef __cplusplus
}
#endif
#define XBowMalloc(a) XBow_malloc(a)
#define XBowFree(a) XBow_free(a)
#endif
#endif
Preprocessor directive used throughout the static library code to direct what code gets compiled.
============================================================
#ifdef MACOS_MEM
XBowFree((void *)m_plane);
#else
delete m_plane;
#endif
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.