box2d icon indicating copy to clipboard operation
box2d copied to clipboard

Enhancement request: provide version information in header file

Open check-switch-26 opened this issue 2 years ago • 2 comments

It is useful to be able to query the version number at compile time - particularly to accommodate differences in the API between versions. (I note that many other libraries provide the same; e.g., FFmpeg, OpenCV, zlib, etc.)

Please consider adding #defines major/minor/revision info in b2_settings.h

check-switch-26 avatar Dec 08 '21 16:12 check-switch-26

Please see extern B2_API b2Version b2_version; in b2_common.h

erincatto avatar Dec 31 '21 00:12 erincatto

Hi, Erin.

The enhancement request is to be able to query the library version at COMPILE time, not run time. For example:

#if BOX2D_MAJOR_VERSION > 2

Thanks. --Ted

On Thu, Dec 30, 2021, 5:54 PM Erin Catto @.***> wrote:

Please see extern B2_API b2Version b2_version; in b2_common.h

— Reply to this email directly, view it on GitHub https://github.com/erincatto/box2d/issues/704#issuecomment-1003227396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWLGU2R3WAIEEXAINZFQEIDUTT5LLANCNFSM5JUH2V2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

check-switch-26 avatar Dec 31 '21 01:12 check-switch-26