mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-12-04 08:02:31 +00:00
15 lines
358 B
C++
15 lines
358 B
C++
#include "ares.h"
|
|
|
|
#include <iostream>
|
|
#include <stdexcept>
|
|
#include <string.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
int version = 0;
|
|
const char* strVersion = ares_version(&version);
|
|
if (strcmp(strVersion, "1.14.0") != 0) {
|
|
throw std::runtime_error("Wrong version: " + std::string(strVersion));
|
|
}
|
|
std::cout << "C-ares version: " << strVersion;
|
|
} |