Question

I created my first xll file with codeblocks & mingw, following this guide http://support.microsoft.com/kb/178474/en-us

The problem is that the dll file, renamed as xll file, is not recognised by excel.

I do not understand the meaning of point 10 of the guide i linked, thus that might be my problem. I thought that def files were an output of the compiler. Why is the guide suggesting that they are an input?

If they are an input, how can I set codeblocks to take the def file as an input?

Thank you.

[EDIT] Issue solved: In case someone incur in the same problem, the issue was definitely the naming convention of the exported functions. By using Def file properly, the issue is solved.

Was it helpful?

Solution

So, the compiler can produce a .def file for a .dll, but (I'm guessing) the reason this is not used here is that you want to have control as to what the names and placement of the symbols are - in particular, since the .dll uses __stdcall, not _cdecl type calling convention.

Here's a page that describes some of the particularities with gcc/mingw and DLL's, including how to use your own .def file:

http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs

In particular, the dlltool:

dlltool -U -d testdll.def -l libtestdll.a

OTHER TIPS

If you have your heart set on codeblocks & mingw, then you won't find https://xll.codeplex.com useful. It requires Microsoft's free version of Visual Studio.

If you need to build an xll to solve a problem, it might help you with that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top