#include "pluginloader.h"
#include <spdlog/spdlog.h>

int main(int argc, char **argv)
{
    if(argc != 2) {
        spdlog::error("usage: {} path/to/plugin.so", argv[0]);
        return -1;
    }

    const auto state = PluginLoader::signature_state(false, true, false);
    PluginLoader loader(argv[1], state);
    if(loader.load()) {
        spdlog::info("Loaded plugin {}", argv[1]);
    } else {
        spdlog::error("Failed loading plugin {}", argv[1]);
        spdlog::error(qUtf8Printable(loader.errorString()));
        return -1;
    }

    return 0;
}