goczmq
goczmq copied to clipboard
How to install for windows os ?
How to install for windows os ? Thanks
@toplinuxsir That's a good question. I don't use windows myself and have never tried. You will need zeromq ( http://zeromq.org/ ) and czmq ( http://czmq.zeromq.org/page:get-the-software ) libraries on windows.
I'll see if I can find someone who is using the library on windows and try to get the documentation updated for it.
Any answer on this ? Just hit same need
Here is some little help for using goczmq in windows
- Use vcpkg to install czmq
- Set environment variable CGO_CFLAGS to include vcpkg include dir
- Set environment variable CGO_LDFLAGS to include vcpkg library dir
- When deploying executable just copy dependent libraries to the same dir "
xxx.exe
lies.
Example:
If vcpkg installed in D:\DEV\vcpkg
and you are writing x64 program.
Steps to go in command line prompt:
-
vcpkg install --triplet=x64-windows czmq
-
set CGO_CFLAGS=-ID:\DEV\vcpkg\installed\x64-windows\include
-
set CGO_LDFLAGS=-LD:\DEV\vcpkg\installed\x64-windows\lib -D:\DEV\vcpkg\installed\x64-windows\bin
- build your program e.g.
go build -a -v
- copy dependent libraries
xxx.dll
to your working directory.
P.S.can use tools like Dependencies to find out which library to copy.