Getting the OAT version

Hi,

is there a direct way to detect the version of the used OpenAT library at the compiling time?

Best Regards,
Ralf

What’s wrong with the predefined macro OAT_API_VERSION :wink: ?

Hi milan_va,

you mean apart from the fact that this macro in the version 2.10c doesn’t exist?
Sorry, I forgot this information in my question — I must differentiate between the OpenAT versions 2.10c, 3.10 and 3.13 now (so I can use this macro), but there can come some OpenAT versions more…

Best Regards
Ralf

Well it works fine for me, but I only need to distinguish between 3.01 and 4.10.
If 2.10 is the only version you use, where OAT_API_VERSION is not defined, then there’s #ifndef.
Or, you can add a conditional define in the project file.

  Milan

Hi,

I using a similar way like your suggestions yet, but they are all indirect — am I right if I assume that OAT_API_VERSION is used with OAT versions 3.x and greater? My distributer couldn’t answer my question :frowning:

Best regards
Ralf

I’m not sure what you mean by that? :confused:

Please explain what you mean by “indirect” here?

Hi awneil,

a direct way to get the OAT version is a macro like OAT_API_VERSION which contains the version and that is available in all OAT versions. An indirect way is using some behaviors of OAT to detect the version, i.e. other definitions. Also an indirect way is the definition of a macro in the project file if a project must be compiled under several OAT versions.

Best Regards
Ralf