Skip to content

Commit ff0d32c

Browse files
committed
ODE: now can built with -fvisibility=hidden
1 parent 814b9ec commit ff0d32c

File tree

7 files changed

+78
-74
lines changed

7 files changed

+78
-74
lines changed

Externals/ode/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ add_dir("${DIRS}")
1010

1111
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/../../sdk/include )
1212

13-
add_definitions(-DdSINGLE -D_SECURE_SCL=0 -DLINUX -D_cdecl= -D__forceinline=inline -fvisibility=default)
13+
add_definitions(-DdSINGLE -D_SECURE_SCL=0 -DLINUX -D_cdecl= -D__forceinline=inline)
1414

1515
add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}__SOURCES} ${${PROJECT_NAME}__INCLUDES})
1616
xr_install(${PROJECT_NAME})

Externals/ode/include/ode/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ typedef struct dJointFeedback {
314314
* when the ODE step function updates the body state.
315315
*/
316316

317-
void dGeomMoved (dGeomID);
317+
ODE_API void dGeomMoved (dGeomID);
318318
dGeomID dGeomGetBodyNext (dGeomID);
319319

320320

Externals/ode/include/ode/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ extern "C" {
4444
#elif !defined(ODE_LIB)
4545
#define ODE_DLL_API __declspec(dllimport)
4646
#endif
47+
#else
48+
#if defined(__GNUC__) && __GNUC__ >=4
49+
#define ODE_API __attribute__ ((visibility("default")))
50+
#endif
4751
#endif
4852

4953
#if !defined(ODE_API)

Externals/ode/include/ode/objects.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,10 +512,10 @@ ODE_API dBodyID dBodyCreate (dWorldID);
512512
*/
513513
ODE_API void dBodyDestroy (dBodyID);
514514

515-
void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
516-
void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
517-
void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
518-
void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably
515+
ODE_API void dWorldAddBody (dWorldID,dBodyID); // X-Ray custom probably
516+
ODE_API void dWorldAddJoint (dWorldID,dJointID); // X-Ray custom probably
517+
ODE_API void dWorldRemoveBody (dWorldID,dBodyID); // X-Ray custom probably
518+
ODE_API void dWorldRemoveJoint (dWorldID,dJointID); // X-Ray custom probably
519519

520520
/**
521521
* @brief Set the body's user-data pointer.
@@ -989,7 +989,7 @@ ODE_API dJointID dJointCreateSlider (dWorldID, dJointGroupID);
989989
* If it is nonzero the joint is allocated in the given joint group.
990990
*/
991991
ODE_API dJointID dJointCreateContact (dWorldID, dJointGroupID, const dContact *);
992-
dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?
992+
ODE_API dJointID dJointCreateContactSpecial (dWorldID, dJointGroupID, const dContact *); // XXX: GSC custom?
993993

994994
/**
995995
* @brief Create a new joint of the hinge2 type.

Externals/ode/ode/src/collision_std.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ int dCollideCapsulePlane (dxGeom *o1, dxGeom *o2, int flags,
5858
#ifdef __cplusplus
5959
extern "C" {
6060
#endif
61-
int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
61+
ODE_API int dCollideRaySphere (dxGeom *o1, dxGeom *o2, int flags,
6262
dContactGeom *contact, int skip);
63-
int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
63+
ODE_API int dCollideRayBox (dxGeom *o1, dxGeom *o2, int flags,
6464
dContactGeom *contact, int skip);
6565
int dCollideRayCapsule (dxGeom *o1, dxGeom *o2,
6666
int flags, dContactGeom *contact, int skip);

0 commit comments

Comments
 (0)