尝试将 Box2D 用于 Iphone 应用程序,但不知道如何将以下 C++ 头文件转换为 Xcode 目标 C ......有人可以帮帮我吗?先感谢您!
#include <Box2D/Common/b2Settings.h>
#include <cstdlib>
#include <cstdio>
#include <cstdarg>
b2Version b2_version = {2, 2, 1};
// Memory allocators. Modify these to use your own allocator.
void* b2Alloc(int32 size){
return malloc(size);
}
void b2Free(void* mem)
{
free(mem);
}
// You can modify this to use your logging facility.
void b2Log(const char* string, ...)
{
va_list args;
va_start(args, string);
vprintf(string, args);
va_end(args);
}