Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (EternallyCurious, Quad, vicknick), 700 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
compiling ackphysx.dll under VS2005 #384637
10/05/11 16:06
10/05/11 16:06
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
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?

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???

Re: compiling ackphysx.dll under VS2005 [Re: HeelX] #384640
10/05/11 16:55
10/05/11 16:55
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Ok, solution is to add #define NOMINMAX in the stdafx.h before including windows.h... frown stupid me.

Re: compiling ackphysx.dll under VS2005 [Re: HeelX] #384650
10/05/11 19:52
10/05/11 19:52
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Here are some info for others which don't have VS 2010 and want to compile it against VS 2005:

- simply add all include folders of the PhysX SDK folder to your directory settings
- the PhysX plugin source uses a lot of code from the PhysX sample folders, so it is also necessary to add the SampleCommonCode folder
- add the sample folders SampleRaycastCar, SampleCharacterController, and maybe I forgot some
- make sure you link against all PhysX libs... I had lots of problems and after I added all, they were gone
- add as source files in the project tab only main.cpp, CharacterControl.cpp, external.cpp and PhysX.cpp
- if you use a precompiled header, open it (stdafx.h) and write #define NOMINMAX before #include <windows.h>
- if you have trouble with ErrorStream.h with the call of MessageBox and casting a string to LPCWSTR, just uncomment the whole switch and return NX_AR_BREAKPOINT. If you can't overwrite the file, make a copy and copy it into your project folder
- if you problems with the plugin headers, try #pragma once instead of the #define guard... I don't know if that solved one of my problems but I better repeat it hear smile
- to test your own dll, make sure that the ORIGINAL ackphysx.dll in acknex_plugins is renamed so that it is NOT loaded, like ackphysx.jcl or so... wink
- if you add features (like me, adding prismatic joints, see here), make sure that you make a copy of the ackphysX.h, copy it in your project folder and do an include with "..." instead of <...>

I hope it helps!

Btw, the source is so horrible.

Last edited by HeelX; 10/05/11 19:54.
Re: compiling ackphysx.dll under VS2005 [Re: HeelX] #384849
10/09/11 15:16
10/09/11 15:16
Joined: Jul 2008
Posts: 894
T
TechMuc Offline
User
TechMuc  Offline
User
T

Joined: Jul 2008
Posts: 894
Quote:
Btw, the source is so horrible.


Actually it reminded me on the GED source code - which is horrible too - both are just the source code of a programmer making his first really big (not first at all) project - which was planned to be smaller, but got bigger laugh
Honestly i do not know why jcl buys this stuff and doesn't let a real professional do such work..but nevermind.

Re: compiling ackphysx.dll under VS2005 [Re: TechMuc] #384852
10/09/11 15:25
10/09/11 15:25
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
If OpGroup/JCL (OJ) is rewriting WED, which is/should be essentially a blend between WED and GED, it could be nice if OJ just releases the source of GED so that other could maybe benefit from it. Or are the rights at Crew51? Afaik, André & Co. don't make games anymore (Call of Death, RIP), so, it could be a nice thing to open it, even if it is "horrible".


Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1