Oh, this again - conflict over "StringTable" between T3D and PhysX

Expanding and utilizing the engine via C++.
60 posts Page 1 of 6
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Jul 31, 2016 11:21 pm
I know I've been here before, but long story short: how I got here was, because of temporary lack of the Project Manager, trying to manually add the physx3 code and include + lib directories to my new 3.9 build, using VS2015. My solution last time I saw this problem was terrible (actually changing the name of Torque's StringTable, everywhere it appeared :-P ) but I think the right answer just boiled down to switching the order of some includes, or something equivalent.

My error output is this:

Code: Select all

1>f:\physx-3.3.1\include\physxvisualdebuggersdk/PvdObjectModelMetaData.h(227): error C2059: syntax error: ')'
1>f:\physx-3.3.1\include\physxvisualdebuggersdk/PvdObjectModelMetaData.h(228): error C2143: syntax error: missing ';' before '{'
1>f:\physx-3.3.1\include\physxvisualdebuggersdk/PvdObjectModelMetaData.h(228): error C2447: '{': missing function header (old-style formal list?)
1>f:\physx-3.3.1\include\physxvisualdebuggersdk/PvdObjectModelMetaData.h(331): error C2059: syntax error: ')'
1>f:\physx-3.3.1\include\physxvisualdebuggersdk/PvdObjectModelMetaData.h(331): error C2238: unexpected token(s) preceding ';'


But when you go to that file, you see that it breaks on the following code:

Code: Select all

   class StringTable
   {
   protected:
      virtual ~StringTable(){}
   public:
      ...
      }


When I added the physx3 code, I also added the include and lib directories to the end of their respective lists in the project properties, and that was all I did. I wonder if I could add them earlier in the lists or something? Or is it a matter of where to call the actual physx include files?
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Tue Aug 02, 2016 6:20 pm
Ping... @
User avatar
Timmy
, got any recall on this one?
Timmy
Posts: 307
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Aug 03, 2016 1:31 am
Yeah @
User avatar
chriscalef
it is the order of inlcudes. I have a physx3 cmake module here https://github.com/rextimmy/Torque3D/co ... d93fda58bc ... To use it just grab the physx source and compile it yourself and than make sure TORQUE_PHYSX3_PATH points to /somepath/PhysX-3.3/PhysXSDK and away you go. I do have a version of that cmake file floating around that adds linux support too.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Aug 03, 2016 1:35 am
Ah, awesome, thanks!!!
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Dec 14, 2016 7:26 am
Hey, @
User avatar
Timmy
, I'm bumping up against this StringTable conflict again with a new system I just built, win10, VS2015. I've been staring at your CMake file for a while now but I still don't really understand what's going on. (Sorry, been using it for years but I still don't really get CMake.) Any chance I could get a breakdown of exactly what include or lib ordering needs to be changed in a project in order to fix this conflict?
Timmy
Posts: 307
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Dec 14, 2016 11:29 am
@
User avatar
chriscalef
Are you running the bog standard physx3 plugin or ya got some of your own stuff in there? Last time i tested it worked out of the box with vs2015. The StringTable is hidden away in the physx namespace, so just double check in any of ya own code if you are doing the whole using physx thing. Let us know how ya go.

Oh yeah on another note, i have a new branch with support for physx 3.4 (still in beta testing) https://github.com/rextimmy/Torque3D/tree/physx_34, i got cmake file in there for it to, works on windows/mac and linux.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Dec 14, 2016 8:12 pm
Huh, this is step one of copying my work to a new project, so I'm starting with just the stock contents of the physx3 directory, was planning on copying in my own work after I got the stock implementation running. I'm still unclear on the "right way" to build a stock physx install, however - in the CMake setup options I see a way to click for bullet physics, etc., but there does not appear to be a physx3 setup option. I'm trying to use the same physx-3.3.1 libs I had running before on my old box (because 3.3.2 never ran for me) but if you've got 3.4 running maybe I should just switch to that.

My methodology so far has been: build the project as a blank vanilla T3D, with no physx at all, then go through and add includes and libs pointing at my physx 3.3.1 directory, and add the physx3 source code to the project. That's all I've done so far. Lemme check your links up there and see if they point me in the right direction...
Timmy
Posts: 307
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Wed Dec 14, 2016 10:00 pm
You gotta save this file https://raw.githubusercontent.com/rextimmy/Torque3D/1770ed01ce45affc76e6ae48278153d93fda58bc/Tools/CMake/modules/module_physx3.cmake and place it in T3DFolder/Tools/Cmake/Modules . There is no official physx cmake file. Than just follow the steps in this post

Code: Select all

To use it just grab the physx source and compile it yourself and than make sure TORQUE_PHYSX3_PATH points to /somepath/PhysX-3.3/PhysXSDK and away you go.
chriscalef
Posts: 332
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Thu Dec 15, 2016 2:52 am
Hm, okay, trying to follow along but not working yet. I still have a few questions:

1) What is pvd/PxPvd.h? That hung me up on my last iteration, it was called from px.h in T3D physics code. I have only one header file in that directory, PxVisualDebugger.h, in either of my physx versions. Did I miss a separate visual debugger SDK install or something?

2) I have two versions of your module_physx3.cmake file now - the one you linked me to in this thread, which says at the top "module Physx 3.x", and the one I got with your 3.4 branch, which is longer and specifies "module Physx 3.4". I've been using the second one as it seems more specific and more complete, but should I use the first one?

3) Are "/PhysX-3.3/PhysXSDK" literal? I have my 3.4 stuff in a directory called "f:/physx-3.3.4/", to which I appended another directory called "PhysX_3.4" because that appeared to be hard coded in your cmake file (?), but I assumed the rest of the path was optional. I can point visual studio to my include and lib directories without much apparent problem, but I still have to do this manually - is CMake supposed to be setting these up for me if I get the config right?

4) If I do it right, will the physx3 folder exist in the project or do I have to add those files manually?

Thanks again for all your help! Project setup, always interesting times... :-p
Timmy
Posts: 307
Joined: Thu Feb 05, 2015 3:20 am
by Timmy » Thu Dec 15, 2016 3:58 am
With physx 3.4 don't worry about that for now, it was more just a casual comment, physx 3.4 is still in closed beta, you gotta ask their licensing department for a copy for testing. So we will stick with 3.3 which is publicly released.

Step 1) clone this repository https://github.com/NVIDIAGameWorks/PhysX-3.3 - if you don't have access see https://developer.nvidia.com/physx-source-github

Step 2) compile the above physx using whatever version of VS you will use in T3D (don't forget both debug and release if you plan on using both in t3d). Currently the cmake file only supports VS 2013/15 32 or 64bit. Go into /where_you_cloned_physx_above/PhysXSDK/source/compiler for the visual studio solution files.

Step 3) make an environment variable called TORQUE_PHYSX3_PATH that points to /where_you_cloned_physx_above/PhysXSDK/ You may need to reboot for this to take affect depending on how you do it.

Step 4) place the physx 3.3 cmake file into T3DFolder/Tools/Cmake/Modules and run cmake and obviously select physx.

Step 5) Open cmake generated solution file and happy days, no more to do but compile and run. It will copy the required dll files etc automagically for ya and also place the physx stuff in the project.

When physx 3.4 is finally publicly released i have made changes to the cmake file that makes this a bit easier, till than you gotta follow the above steps.

PVD is the visual debugger for physx.

Also nvidia told me they will never again release physx in compiled form, from here on out it is github source code only. Unfortunately for licensing reasons we can't ship T3D with the physx source, hence why you gotta manually grab it and compile yourself. In case you are wondering, the physx sdk source code contains PhysX sdk, APEX sdk and PVD source code.
60 posts Page 1 of 6

Who is online

Users browsing this forum: No registered users and 1 guest