Hi,
I am in the process of writing an excel extension (xll -
https://msdn.microsoft.com/EN-US/library/office/bb687850.aspx). This is a shared library / dll with some restrictions (such as x86, calling convention and need to export functions with particular names and signatures) (and also able to call back into excel through another shared library).
Now, I have been looking into trying to do this with golang, but am a bit uncertain if it will be possible at all. In particular the following are the things would to my understanding be needed:
- Being able to build a (x86) shared library as a dll => This seems as if it is possible with gccgo but not with the standard compiler. (maybe)
- Make the compiled library use the __stdcall convention, this seems to be the default for cgo on windows.
- Making the built library being able to call into other shared libraries (dll's), this also seems possible for both cg and gccgo.
However, when reading I also find several posts/text which indicate that it may not be posible to achive what I want using golang today in particular relating to builds of type plugin). Does anyone have any experience in this, i.e. will it at all be possible or had I better just resort to C++ (which I ideally would prefer not to)? If so would my best bet be to try to use cgo or gccgo?
Thankful for any pointers
Viktor
Some additional links: