XLW - Compiled XLL "The file format and extension don't match"

3.5k views Asked by At

I'm using XLW 5 to build an Excel XLL add in, and am experimenting with the EchoShort template example. I successfully compiled Template.xll using GNU Make, with g++ version 4.9.2 (mingw-w64) under cygwin. However, when trying to open the XLL, Excel 2013 reports the error:

The file format and extension of Template.xll don't match. The file could be corrupted, or unsafe. Unless you trust its source, don't open it. Would you like to open it anyway?

I proceed to open it, and it seems to be filled with unreadable characters. I tried adding the xll using the add-in manager under the developer tab, yet when I try to call EchoShort in a cell, I get a #NAME error.

I'm new to XLW and this seems like an incredible package, if I can get it working. Any help is much appreciated.

EDIT: Should have mentioned it's under cygwin

EDIT: Also tried with VS2013, and the same thing happened, so it's not cygwin nor MinGW.

1

There are 1 answers

1
AlmostSurely On

It turns out the VS2013 x64 compiled xll works, since I appear to be using Excel 2013 x64. I think I need to clean up my $PATH, since dependency-walker shows a mixture of 32 bit and 64 bit dlls?