andlabs / ui

Platform-native GUI library for Go.
Other
8.33k stars 651 forks source link

DllMain #331

Closed xuanjiang1985 closed 5 years ago

xuanjiang1985 commented 5 years ago

I got an error:

$ go run main.go
# command-line-arguments
D:\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
D:/GoWorks/src/github.com/andlabs/ui/libui_windows_amd64.a(init.cpp.obj): In function `DllMain':
C:/projects/libui/windows/init.cpp:170: multiple definition of `DllMain'
C:\Users\ADMINI~1\AppData\Local\Temp\go-link-196714667\000046.o:D:/GoWorks/src/github.com/go-vgo/robotgo/vendor/github.com/robotn/gohook/hook/windows/properties_c.h:193: first defined here
collect2.exe: error: ld returned 1 exit status

I am a PHPer, I have no idea to deal with that.

andlabs commented 5 years ago

FWIW this is a bug both in libui and in this gohook thing; neither of us should be exporting DllMain

andlabs commented 5 years ago

Moved to https://github.com/andlabs/libui/issues/433