Need to write a Windows .dll for a project. Within my dll, I need to use protobufs and grpc to get some data. Having a really hard time linking everything together due to several errors I cannot seem to fix.
Application and some of the other code I'm using are compiled with /MD, not /MT.
Originally, I had installed gRPC like this:
vcpkg.exe install zlib:x64-windows-static
vcpkg.exe install c-ares:x64-windows-static
vcpkg.exe install openssl:x64-windows-static
vcpkg.exe install protobuf[zlib]:x64-windows-static
vcpkg.exe install grpc:x64-windows-static
But that seems to compile with /MT, and the rest of the code and the application is built with /MD, so I tried to switch to this:
vcpkg.exe install zlib:x64-windows
vcpkg.exe install c-ares:x64-windows
vcpkg.exe install openssl:x64-windows
vcpkg.exe install protobuf[zlib]:x64-windows
vcpkg.exe install grpc:x64-windows
Instead of giving me .libs, this gave me .dll files.
Now I'm trying to build grpc directly like this:
cd grpc
git submodule update --init
mkdir build64
cd build64
cmake ..
Once I loaded the .sln file and built it in VisualStudio, I think this gave me over 100 .lib files, some of which also includes protobuffers. Do I add all 100+ .lib files into my project? I tried adding them individually to fix obvious unresolved externals, but I'm thinking I must be going about this the wrong way and could use some hints.
Thanks,
Stéphane