Rigid Body Dynamics Library
rbdl_version.cc File Reference

Go to the source code of this file.

Functions

RBDL_DLLAPI int rbdl_get_api_version ()
 
RBDL_DLLAPI void rbdl_check_api_version (int version)
 
RBDL_DLLAPI void rbdl_print_version ()
 

Function Documentation

◆ rbdl_check_api_version()

RBDL_DLLAPI void rbdl_check_api_version ( int  version)

Ensures whether the RBDL library we are linking against is compatible with the the version we have from rbdl.h.

To perform the check run:

RBDL_DLLAPI void rbdl_check_api_version(int version)
Definition: rbdl_version.cc:20

This function will abort if compatibility is not met or warn if you run a version that might not be entirely compatible.

In most cases you want to specify a specific version to ensure you are using a compatible version. To do so replace API_VERSION by a value of the form 0xAABBCC where AA is the major, BB the minor, and CC the patch version in hex-format, e.g:

Would abort if the API major version is not 2 (= 0x02), warn if the linked minor version is not 10 (= 0x0A). The patch version 12 (= 0x12) does not have an influence on compatibility.

Definition at line 20 of file rbdl_version.cc.

References rbdl_get_api_version().

◆ rbdl_get_api_version()

RBDL_DLLAPI int rbdl_get_api_version ( )

Returns the API version at compile time of the library.

Definition at line 15 of file rbdl_version.cc.

◆ rbdl_print_version()

RBDL_DLLAPI void rbdl_print_version ( )

Prints version information to standard output

Definition at line 53 of file rbdl_version.cc.

References rbdl_get_api_version().