Hello Bazel community,
I have trouble building a source code that uses openssl with Bazel on Windows.
The code relevant part:
int main() {
auto cipher = EVP_aes_256_gcm();
auto ctx = EVP_CIPHER_CTX_new();
return 0;
}
and the Bazel BUILD file:
cc_library(
name = "check_license",
srcs = ["cpprest/check_license_offline.cc"],
hdrs = ["cpprest/my_header.h"],
deps = [
"//mediapipe/framework/port:cpprest",
],
linkopts = select({
"//mediapipe:windows": [
"-DEFAULTLIB:cpprest_2_10.lib",
],
"//conditions:default": [
"-lcpprest",
"-lboost_system",
"-lssl",
"-lcrypto",
],
}),
)
and I'm getting a whole bunch of errors on Windows at the linking stage:
check_license.lib(check_license_offline.obj) : error LNK2019: unresolved external symbol EVP_aes_256_gcm referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > (message clipped)"
I have no issues on Linux with the same BUILD script.
How to fix this on Windows?
Thanks.