From 5bb8330b7b8f00d637fda6b4dfa87400a69cb1be Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Mon, 4 Oct 2010 19:05:56 +0000 Subject: [PATCH] =?UTF-8?q?Applied=20patch=20for=20several=20build=20issue?= =?UTF-8?q?s:=20+=20add=20empty=20constructors=20to=20make=20Bullet=20comp?= =?UTF-8?q?ile=20using=20clang.=20Thanks=20to=20Stillmoon=20for=20the=20re?= =?UTF-8?q?port=20and=20patch,=20See=20http://bulletphysics.org/Bullet/php?= =?UTF-8?q?BB3/viewtopic.php=3Ff=3D9&t=3D5730=20+=20bullet-2.77/Demos/Open?= =?UTF-8?q?CLClothDemo/cloth.h:103:=20error:=20=E2=80=98sprintf=E2=80=99?= =?UTF-8?q?=20was=20not=20declared=20in=20this=20scope=20Thanks=20to=20ppr?= =?UTF-8?q?kut=20for=20the=20report=20in=20Issue=20435=20+=20cmake=20build?= =?UTF-8?q?=20fails=20on=20Unix=20systems=20when=20using=20BUILD=5FSHARED?= =?UTF-8?q?=5FLIBS.=20Added=20pthreads=20to=20BulletMultiThreaded=20Thanks?= =?UTF-8?q?=20to=20pprkut=20for=20the=20report=20in=20Issue=20434?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Demos/OpenCLClothDemo/cloth.h | 2 +- src/BulletMultiThreaded/CMakeLists.txt | 7 ++++++- src/BulletSoftBody/btSoftBody.h | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Demos/OpenCLClothDemo/cloth.h b/Demos/OpenCLClothDemo/cloth.h index 9d4e80b30..386a8928d 100644 --- a/Demos/OpenCLClothDemo/cloth.h +++ b/Demos/OpenCLClothDemo/cloth.h @@ -20,7 +20,7 @@ subject to the following restrictions: #include #include #include "LinearMath/btScalar.h" - +#include //sprintf struct vertex_struct { diff --git a/src/BulletMultiThreaded/CMakeLists.txt b/src/BulletMultiThreaded/CMakeLists.txt index 16945adc2..755f59cfc 100644 --- a/src/BulletMultiThreaded/CMakeLists.txt +++ b/src/BulletMultiThreaded/CMakeLists.txt @@ -73,9 +73,14 @@ SUBDIRS(GpuSoftBodySolvers) IF (BUILD_SHARED_LIBS) - TARGET_LINK_LIBRARIES(BulletMultiThreaded BulletDynamics BulletCollision) + IF (UNIX) + TARGET_LINK_LIBRARIES(BulletMultiThreaded BulletDynamics BulletCollision pthread) + ELSE() + TARGET_LINK_LIBRARIES(BulletMultiThreaded BulletDynamics BulletCollision) + ENDIF() ENDIF (BUILD_SHARED_LIBS) + IF (INSTALL_LIBS) IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) #INSTALL of other files requires CMake 2.6 diff --git a/src/BulletSoftBody/btSoftBody.h b/src/BulletSoftBody/btSoftBody.h index 4d975b7fb..76dd02f59 100644 --- a/src/BulletSoftBody/btSoftBody.h +++ b/src/BulletSoftBody/btSoftBody.h @@ -183,12 +183,14 @@ public: btScalar m_kAST; // Area/Angular stiffness coefficient [0,1] btScalar m_kVST; // Volume stiffness coefficient [0,1] int m_flags; // Flags + Material() : Element() {} }; /* Feature */ struct Feature : Element { Material* m_material; // Material + Feature() : Element() {} }; /* Node */ struct Node : Feature @@ -202,6 +204,7 @@ public: btScalar m_area; // Area btDbvtNode* m_leaf; // Leaf data int m_battach:1; // Attached + Node() : Feature() {} }; /* Link */ struct Link : Feature @@ -213,6 +216,7 @@ public: btScalar m_c1; // rl^2 btScalar m_c2; // |gradient|^2/c0 btVector3 m_c3; // gradient + Link() : Feature() {} }; /* Face */ struct Face : Feature @@ -221,6 +225,7 @@ public: btVector3 m_normal; // Normal btScalar m_ra; // Rest area btDbvtNode* m_leaf; // Leaf data + Face() : Feature() {} }; /* Tetra */ struct Tetra : Feature @@ -231,6 +236,7 @@ public: btVector3 m_c0[4]; // gradients btScalar m_c1; // (4*kVST)/(im0+im1+im2+im3) btScalar m_c2; // m_c1/sum(|g0..3|^2) + Tetra() : Feature() {} }; /* RContact */ struct RContact @@ -272,6 +278,7 @@ public: int m_rank; // Rank Node* m_nodes[4]; // Nodes btScalar m_coords[4]; // Coordinates + Note() : Element() {} }; /* Pose */ struct Pose