使用Go程序在VS C ++中编写的第三方窗口DLL

时间:2014-10-05 08:53:03

标签: winapi dll go

我有用C ++编写的第三方Windows库的.lib,.h和.dll文件(使用Visual Studio compiller)

如何从Go程序中使用这样的.dll?如果cgo使用MinGW C ++,它有可能吗?

您能否在线指出任何示例?我尝试使用syscall.NewLazyDLL()调用本机Windows DLL,但它不适用于第三方DLL。

谢谢!

我收到的错误如下:

C:\DOCUME~1\Alex\LOCALS~1\Temp\go-build023179027\zelid\gowingui.a(_all.o): malformed pe file: unexpected flags 0xe0500020 for PE section .text

C:\DOCUME~1\Alex\LOCALS~1\Temp\go-build404633023\zelid\gowingui.a(_all.o): malformed pe file: unexpected flags 0xe0500020 for PE section .text main._Cfunc_HTMLayoutProcND: undefined: _cgo_c2d779df8b44_Cfunc_HTMLayoutProcND

$ gcc --version gcc (tdm-2) 4.8.1 Copyright (C) 2013 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.

$ go version go version go1.3.3 windows/386

0 个答案:

没有答案