Posted By: HeelX
compiling ackphysx.dll under VS2005 - 10/05/11 16:06
Hi, I found out in the NVidia SDK that there are more joints available than the Gamestudio ones.. and since I need those, I want to implement them myself into the ackphysx.dll. Since I use VS 2005, I just wanted to make a thread about it, because I already face some problems...
Problem: when including NxWheel.h....NxMath.h, I get everytime an error, because the standard min and max macros are defined. You can say with #define NOMINMAX before #include <windows.h>, that you don't want them, but the error is still thrown during compilation! I can write #undef min and #undef max after including windows.h so that I get no error and it compiles, but I think that isn't the way it should be, right?
Has anyone tried that???
Problem: when including NxWheel.h....NxMath.h, I get everytime an error, because the standard min and max macros are defined. You can say with #define NOMINMAX before #include <windows.h>, that you don't want them, but the error is still thrown during compilation! I can write #undef min and #undef max after including windows.h so that I get no error and it compiles, but I think that isn't the way it should be, right?
Code:
#include "stdafx.h" #ifdef _MANAGED #pragma managed(push, off) #endif #define NOMINMAX #include <windows.h> //#undef min //#undef max // compiles, but is this right??? // engine #define DLL_USE #include "adll.h" // physx.. #include "NxWheel.h" // in NxMath.h: Error: min or max is #defined BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { // link acknex engine engine_bind(); return TRUE; } DLLFUNC void ackphysx_dll (void) { error("say hello to ackphysx.dll!"); } #ifdef _MANAGED #pragma managed(pop) #endif
Has anyone tried that???