Closed wlwatkins closed 2 years ago
Ok, after a day of pulling my hair.
All I need to do is add C:\dev\vcpkg\installed\x64-windows\bin
to my PATH in windows' env. variables. and now after rebooting vscode, it finds the dll.
I don't understand. (I don't know windows.) Isn't PATH for executables, not for libraries? It looks like an issue with the configuration of vscode. Can you provide a full working configuration for vscode?
I believe PATH is used to allow access to executables but also dll. in the case of libzmq, the CGO_LDFLEG is used to indicate the path to the libzmq.lib file, but trying to run it, as indicated, yields the 0xc0000135
which according to a google search means STATUS_DLL_NOT_FOUND
. This is because, by default, vcpkg does not include the \bin path in the env. var PATH. Hence, adding this makes everything work.
yes, the dll(zeromq.dll) must be included in windows env, it will work!
I managed to install libzmq using https://github.com/zeromq/czmq#windows I set my env var as
set CGO_CFLAGS=-IC:/dev/vcpkg/installed/x64-windows/include set CGO_LDFLAGS=-LC:/dev/vcpkg/installed/x64-windows/lib -l:libzmq-mt-4_3_4.lib
yet I get exit status 0xc0000135 when I run a simple zmq test