libtailscale icon indicating copy to clipboard operation
libtailscale copied to clipboard

Fix/windows port finishing

Open SCLevi opened this issue 2 years ago • 1 comments

SCLevi avatar Jan 22 '24 08:01 SCLevi

When I looked at this previously, I found that Go's support for buildmode=c-shared wasn't implemented for windows. How are you building the shared library?

raggi avatar Nov 21 '25 18:11 raggi

Let me answer instead of Levi, since we've worked together on this a little bit: We are using TDM GCC on windows to build this.

$env:CGO_ENABLED = '1'
$env:CGO_LDFLAGS = '-lws2_32'
$env:CC = 'gcc'
go build -buildmode=c-shared -o libtailscale.dll -x

balazsbencs-sc avatar Nov 26 '25 15:11 balazsbencs-sc