--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/ok8f90k2otg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/34c33139-984c-4f5e-8f7d-ef07f28c367fn%40googlegroups.com.
jaten@DESKTOP-689SS63 ~/tmp $ gcc -o main main.c
jaten@DESKTOP-689SS63 ~/tmp $ go build -o hello.dll -buildmode=c-shared dll.go
jaten@DESKTOP-689SS63 ~/tmp $ lh
total 3.0M
drwxrwxr-x+ 1 Administrators SYSTEM 0 Nov 1 07:40 ../
-rw-r--r--+ 1 jaten None 642 Nov 10 16:16 main.c
-rw-r--r--+ 1 jaten None 402 Nov 10 16:16 dll.go
-rwx------+ 1 jaten None 54K Nov 10 16:16 main.exe*
drwx------+ 1 jaten None 0 Nov 10 16:17 ./
-rwx------+ 1 jaten None 2.7M Nov 10 16:17 hello.dll*
jaten@DESKTOP-689SS63 ~/tmp $ ./main.exe
Go runtime initialized
jaten@DESKTOP-689SS63 ~/tmp $ # also the pop up window was seen.
jaten@DESKTOP-689SS63 ~/tmp $ go build -o hello2.dll -buildmode=c-shared dll2.go
jaten@DESKTOP-689SS63 ~/tmp $ gcc -o main main.c ## after replacing hello.dll with hello2.dll in the LoadLibrary() call.
jaten@DESKTOP-689SS63 ~/tmp $ ./main.exe
jaten@DESKTOP-689SS63 ~/tmp $ gcc --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
jaten@DESKTOP-689SS63 ~/tmp $ which gcc
/cygdrive/c/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/gcc
jaten@DESKTOP-689SS63 ~/tmp $ go version
go version go1.23.2 windows/amd64