Announcement

Collapse
No announcement yet.

fatal error C1083: Cannot open include file: 'Px.h'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    fatal error C1083: Cannot open include file: 'Px.h'

    I would like to do a basic actor that would spawn a rigid body.

    So I just added #include "PhysXIncludes.h" to the basic starter actor templates.

    Compilation returns me the following error : Error G:\placeholdername\Unreal_Engine\Epic Games\4.10\Engine\Source\Runtime\Engine\Public\PhysXIncludes.h(20) : fatal error C1083: Cannot open include file: 'Px.h': No such file or directory

    I have looked at the properties and added the physx SDK lib and include directory already.

    What have I overlooked?

    Thanks.
    Last edited by aws357; 11-30-2015, 05:54 AM.

    #2
    What version of visual studio are you using and what version of PhysX SDK. Also have you read the NVIDIA PhysX SDK Documentation for installation instructions.
    Michael

    EDIT: Did you follow this guide by Rama https://wiki.unrealengine.com/PhysX,...o_Your_Project
    Last edited by JIGGITPrime; 11-21-2015, 12:04 PM.

    Comment


      #3
      Hello. I'm trying to use the PhysX libraries and am running into the same issues. I use VS 2015 and I believe that I have PhysX version 3.3, but I don't have the Source files.

      Are these Source files only available from GitHub? The link to the files from the tutorials doesn't seem to work for me, so I put in a request at this NVIDIA site, but so far I haven't heard anything back. I didn't have a GitHub account prior to the request, so I quickly made one before submitting the request. It's been half a day, but is it supposed to take this long, or was there a step that I might have missed?

      Thanks in advance. Here's an image just to show what I have.

      Click image for larger version

Name:	PhysXIncludes.png
Views:	1
Size:	225.5 KB
ID:	1093757

      EDIT: I apparently didn't associate my new GitHub account with my Unreal profile. I did that just recently - let's see if that gets me anywhere closer.
      Last edited by akiro64; 11-23-2015, 07:52 PM.

      Comment


        #4
        I took a look at Rama's tutorial and interestingly, all I have in \4.10\Engine\Source\ThirdParty\PhysX\PhysX-3.3 is "include" and "lib". No "source".

        Does it means my install is broken? The tutorial also refers to git... should I clone the git directory and just copy the missing "source" directory to build physx like in the tutorial?

        I am going to try this anyway, but confirmation would be helpful for my motivation...

        >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

        Update : cloned the repository and loaded PhysX.sln

        Build fail. The target lib is where it is supposed to be... Any suggestion?

        I checked the linker input in the project properties and nvToolsExt32_1.lib is mentionned in the additional dependencies.

        Code:
        Severity	Code	Description	Project	File	Line
        Error	LNK1181	cannot open input file './../../../externals/nvToolsExt/1/lib/Win32/nvToolsExt32_1.lib'
        Last edited by aws357; 11-24-2015, 10:35 AM.

        Comment


          #5
          Make sure you followed these steps carefully:
          1. Get the full engine source from GitHub (there is a tutorial on UE4's official documentation) either in a .zip or using a pull request.
          2. Compile that build - and follow the steps on the documentation about making it default,etc
          3. Run the build and open your project
          4. Include PhysX libs in YourProject.build
          5. Include the proper classes (#include) in the class in question


          I think these are the steps, I'm not at home currently. Did you follow these steps carefully? Again, they are on the documentation somewhere.
          [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

          Looking for fellow programmers to develop a project.

          Comment


            #6
            Instructions I am following : https://docs.unrealengine.com/latest...ine/index.html

            Downloaded the source as a zip per the instructions.

            Double clicked on GenerateProjectFiles.bat

            Code:
            Setting up Unreal Engine 4 project files...
            
            GenerateProjectFiles ERROR: It looks like you're missing some files that are req
            uired in order to generate projects.  Please check that you've downloaded and un
            packed the engine source code, binaries, content and third-party dependencies be
            fore running this script.
            The instructions does not mention other stuffs to download aside from the sources. Any suggestion?

            Edit : looked if there was any "required files" as in other older tutorials, but found nothing related.
            Last edited by aws357; 11-26-2015, 05:31 AM.

            Comment


              #7
              ok, found why GenerateProjectFiles was not working : in the manual pages add

              0. run Setup.bat (and place the directory in a path that is not too long or it will start throwing errors too... )

              1. Inside the root directory, run GenerateProjectFiles.bat to set-up your project files.

              Comment


                #8
                Summary :
                I built Unreal Engine from source with VS2015.
                I built Physx3.3 from source with VS2015.

                Yet when I compile, I get the same fatal error than in the original question.

                edit : Px.h is located in \UnrealEngine-release\Engine\Source\ThirdParty\PhysX\PhysX-3.3\include\foundation

                Tried adding the include directory from Physx in the project properties C++ directory, to no avail. I don't know what to do now...
                Last edited by aws357; 11-27-2015, 06:16 AM.

                Comment


                  #9
                  Hey guys. Hope your having a good Holiday so far!

                  Thanks to Horus and aws357, I found out what I needed to do while working through the instructions. All I needed to do to get the #include "PhysXIncludes.h" to work was to modify the MyProject.Build.cs file like shown in the image below. That was a step included in Rama's tutorial, but I still ended up downloading and compiling the source code for UE4 which I'm not sure if I needed to do. Before taking the plunge to download the source, you can try to see if this simple step is all you need.

                  Click image for larger version

Name:	PhysXIncludesWorks.png
Views:	1
Size:	83.0 KB
ID:	1094059

                  Comment


                    #10
                    Glad you sorted it out mate!

                    Have fun and let us know how you're doing (WIP thread)
                    [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                    Looking for fellow programmers to develop a project.

                    Comment


                      #11
                      Thanks Akiro. That did the trick ! Glad I was helpful, but you solved the problem.

                      Comment


                        #12
                        Thanks akiro. Simple solution that works.

                        Comment


                          #13
                          So simple? I'd never noticed there are some C# files Well I copied all required headers to Engine\Source\Runtime\Engine\Public so I guess I won't be needing that for a while at least not until next update as I'm running 4.10 and there is 4.11 preview 6 already. But to my defense - who would want to read some manuals at 5AM? Akiro, thanks for saving me(us) from future copy/pasting header files

                          Comment


                            #14
                            I was able to follow along with the thread, and also realized that I could add "PhysX", "APEX" to my Build.cs. After that, though, I'm running into "unresolved external symbol" for 'UPhysicsSerializer::SerializePhysics' and 'UPhysicsSerializer::CreatePhysicsData' functions. For some unknown reason, I can't figure this one out.

                            I'm working on making some changes to UInstancedStatisMeshComponent, which calls those two functions. Even though I've added PhysX to the build, and all of the includes don't give errors (included the same .h UISMC uses), I can't seem to get this unresolved external symbol to go away.

                            My understanding is that the most likely cause is the Definition for those functions isn't linking for some reason, but I don't really know why. It all seems to be under the "Engine" module, so I can't think of why this is happening. Especially since I'm using the same function (only needed it to not be private) and includes. Every line should be exactly the same character for character.

                            Any thoughts?

                            Comment


                              #15
                              Thanks, akiro, i vasted half day before found your solution

                              Comment

                              Working...
                              X