PhysX build no VS2017 support

UE4 supports Visual Studio 2017 for a while now, but the BuildPhysX.Automation.cs was not updated it seems, it is not possible to build PhysX with VS2017.

Hi,

Were you using Preview 2 when you ran into problems with this? I just tried building the entire Preview 3 solution using VS 2017, and didn’t have any failures in the build. Where are you seeing issues with PhysX in your build?

Hi ,

take a look at the file here, you see that, even in master, it only supports 2013 and 2015: https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Programs/AutomationTool/Scripts/BuildPhysX.Automation.cs#L117
You did not notice that it fails with 2017 because by default, PhysX is not built.
For building it, you have to run the GenerateProject_UAT.bat in Engine/Source/ThirdParty/PhysX and then open the generated .sln file and compile it.

Now since it doesn’t support VS2017, no .sln file is generated and you cannot build it.
Since it isn’t build by default, it was probably missed that it doesn’t work with 2017 when the support for 2017 was added to UE4.

Hi,

Thanks for the clarification. I can see what you were looking at now. I checked with one of our engineers who is more familiar with our integration of PhysX, and he mentioned that this is unfortunately something we will have to wait for Nvidia to update, since they are the ones who actually put together the cmake files used to build the project.

Interesting, thanks!

Does he know if Nvidia has any roadmap on when they plan to update those cmake files? I don’t really want to switch back to 2015 just because of this…

Right now we are not aware of any definite timeframe for when this will be updated. If I were to guess, I would say that Nvidia may be waiting for an RTM version of Visual Studio 2017 to be available. It may be updated sooner than that, though.

Hey ,

now that VS2017 is out for a while, there is unfortunately still no support for VS2017 in that BuildPhysX.Automation.cs. Are you sure that Nvidia is aware of that they are the ones who need to update it?

Thanks!

Hi,

Sorry for the delayed response. I have not yet heard anything regarding Physx support for VS2017. I’ll see if I can get some more information about this.

Hey , did you get some more information about this? It still doesn’t support 2017.

Hi,

I checked on this again this morning, and it appears that Nvidia has run into some trouble with getting the PhysX SDK to compile in VS 2017. At the moment they are still unsure where the problem lies. They are still working on it, but were not able to provide a timeframe.

Hi,
Unfortunately we are waiting for a VS2017 update that fixes a compiler bug, that show within our SDK:

In next release we can expect a fix hopefully, then we can update the cmake files and make an official release, but atm we dont support VS2017, sorry about that.
Sorry for the trouble, regards
Ales

Hi, I managed to build PhysX using VS 2017, with the VS 2015 toolset. It was a matter of modifying the BuildPhysX.Automation.cs file so it would feed the correct arguments into CMake for that configuration, and updating the CMake version so it would know how to target VS 2017.

I’ll make a Pull Request on GitHub once I polish it up a bit.

Here’s the Pull Request I made: https://github.com/EpicGames/UnrealEngine/pull/4555

It can’t be used as is, because CMake is downloaded from the UE4 GitHub dependencies CDN which contains CMake 3.5 that doesn’t support targetting VS2017. You need to update CMake by replacing the bin and share folders in Engine\Extras\ThirdPartyNotUE\CMake, to the folders from CMake 3.10.

1 Like

FYI - this is still an issue even in 4.23… thanks for posting Pull Request checking out now

This issue is still present in 4.24