2012-01-03 98 views
0

我正在調試由其他人完成的Excel 2010插件,從WindowsXP 32位移動到Windows 7 64位。Excel插件錯誤從WindowsXP 32位移到Windows7 64位

我在XLCALL.CPP文件中得到了編譯時錯誤,這是「Microsoft Excel Developer's Toolkit - 版本14.0」的一部分。

這是錯誤的代碼:

... 
typedef int (PASCAL *EXCEL12PROC) (int xlfn, int coper, LPXLOPER12 *rgpxloper12, LPXLOPER12 xloper12Res); 

HMODULE hmodule; 
EXCEL12PROC pexcel12; 

__forceinline void FetchExcel12EntryPt(void)  // <<< error, line 36 
    { 
     if (pexcel12 == NULL) 
     { 
      hmodule = GetModuleHandle(NULL); 
      if (hmodule != NULL) 
      { 
       pexcel12 = (EXCEL12PROC) GetProcAddress(hmodule, EXCEL12ENTRYPT); 
      } 
     } 
    } 

這是錯誤消息:

S:\3rdparty\2010 Office System Developer Resources\Excel2010XLLSDK\SRC\XLCALL.CPP|36|error: expected constructor, destructor, or type conversion before 'void' 

我沒有關於此錯誤的可能原因的線索。在XLCALL.H包含文件中沒有類定義,只是POD結構,所以它不應該查找構造函數/析構函數。錯誤引用的函數是該文件的本地文件(即,未在include文件中聲明)。沒有包含其他文件。

謝謝任何​​幫助!

平臺:
的Windows 7 64位
Excel 2010中
MINGW32
代碼塊10.05

回答

1

好吧,看來開發具有與微軟產品合作C++工具,最好的事情是使用Microsoft Visual C++。

這樣做,所有這些問題都消失了。