Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the library version information #172

Closed
rossanoparis opened this issue Jul 7, 2024 · 2 comments
Closed

how to get the library version information #172

rossanoparis opened this issue Jul 7, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@rossanoparis
Copy link

Perhaps I didn't look carefully, but I was not able to find a way to to get the library version information from source code.

@sammycage sammycage added the enhancement New feature or request label Jul 7, 2024
@sammycage
Copy link
Owner

#45 #170

@sammycage
Copy link
Owner

sammycage commented Jul 7, 2024

This feature has been added in the latest commit. Here's a concise example demonstrating the use of both LUNASVG_VERSION_STRING and LUNASVG_VERSION_ENCODE:

#include <iostream>
#include <lunasvg.h>

int main() {
    std::cout << "LunaSVG version: " << LUNASVG_VERSION_STRING << std::endl;
    if (LUNASVG_VERSION > LUNASVG_VERSION_ENCODE(2, 3, 0)) {
        std::cout << "Current version is newer than 2.3.0" << std::endl;
    }
    return 0;
}

This example prints the current version string and checks if the current version is newer than 2.3.0.

@sammycage sammycage added the documentation Improvements or additions to documentation label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants