goczmq icon indicating copy to clipboard operation
goczmq copied to clipboard

How to install for windows os ?

Open toplinuxsir opened this issue 8 years ago • 3 comments

How to install for windows os ? Thanks

toplinuxsir avatar Feb 16 '17 09:02 toplinuxsir

@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.

taotetek avatar Feb 16 '17 11:02 taotetek

Any answer on this ? Just hit same need

joeblew99 avatar Aug 14 '17 20:08 joeblew99

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.

tinkernels avatar Jan 22 '22 05:01 tinkernels