# Cmake project with PhysX

**URL:** <https://forums.developer.nvidia.com/t/cmake-project-with-physx/30894>\
**Category:** Physics Modeling (closed)\
**Created:** [September 29, 2013, 7:39pm UTC](https://forums.developer.nvidia.com/t/cmake-project-with-physx/30894 "2013-09-29T19:39:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tjcollins](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tjcollins](https://forums.developer.nvidia.com/u/tjcollins)\
**Post date:** [September 29, 2013, 7:39pm UTC](https://forums.developer.nvidia.com/t/cmake-project-with-physx/30894/1 "2013-09-29T19:39:53Z")

</div>

Hello,

I am trying to create a CMake file for a personal PhysX project (school-related). I was wondering if someone could tell me the order in which the PhysX libraries need to be statically linked. I can compile and link the libraries without issue, but I get a number of ‘undefined symbol’ errors due to the fact that the static linking order is incorrect. I had to fix the same issue when I created a netbeans project. But I can’t use --start-group and --end-group in cmake (that I am aware of). Does anyone have any assistance they can offer? Thanks

---

<div class="post-metadata">

**Author:** ![busta78](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@busta78](https://forums.developer.nvidia.com/u/busta78)\
**Post date:** [September 30, 2013, 3:04pm UTC](https://forums.developer.nvidia.com/t/cmake-project-with-physx/30894/2 "2013-09-30T15:04:02Z")

</div>

Just a quick explanation of my usage of PhysX. I’m using PhysX in a shared library that get loaded at runtime. I tried every imaginable combination and was successful at getting the shared object build at loaded correctly. However, even with that I had issues with missing symbols whenever I tried to start a PVD connection. The only thing that was able to resolve all link errors in --start-group, --end-group like you alluded to. I would assume that CMake must have some way to specify compiler and linker flags, so I would dig into the CMake documentation to see how this could be done. Sorry I couldn’t offer more help but I’m not thoroughly familiar with CMake.
