I am experimenting with gcc-4.1 snapshot branch trying to get Trolltech's Qt-4.1 compiled on Windows XP. While it compiles and runs fine, I encounter weird errors similar to one the below that I have to work around. accessible\qaccessible_win.cpp: At global scope: accessible\qaccessible_win.cpp:1053: error: 'LONG HWND__*::*LTHUNK3(HWND__**)' a liased to undefined symbol '_ZN18QWindowsAccessible9GetWindowEPP6HWND__' Looking at the code in question (listed below) there are many methods in this class which are declared to be STDMETHODCALLTYPE (__stdcall). GCC rejects only 3 methods from the several defined with this calling convention. These are the methods in below code snippet where the STDMETHODCALLTYPE is commented out. (/* STDMETHODCALLTYPE */). There doesn't seem to be any difference between the rejected and accepted methods as far as declaration and definition goes - all are declared as STDMETHODCALLTYPE and all are defined in the same file. On what basis is GCC rejecting to compile these methods? What's different with the rejected methods compared to the ones which are accepted? Thanks! Parag --------------------------------------------------------------------------------------------------------------- class QWindowsAccessible : public IAccessible, IOleWindow, QAccessible { public: QWindowsAccessible(QAccessibleInterface *a) : ref(0), accessible(a) { } virtual ~QWindowsAccessible() { delete accessible; } HRESULT STDMETHODCALLTYPE QueryInterface(REFIID, LPVOID *); ULONG STDMETHODCALLTYPE AddRef(); ULONG /* STDMETHODCALLTYPE */ Release(); HRESULT STDMETHODCALLTYPE GetTypeInfoCount(unsigned int *); HRESULT STDMETHODCALLTYPE GetTypeInfo(unsigned int, unsigned long, ITypeInfo **); HRESULT STDMETHODCALLTYPE GetIDsOfNames(const _GUID &, wchar_t **, unsigned int, unsigned long, long *); HRESULT STDMETHODCALLTYPE Invoke(long, const _GUID &, unsigned long, unsigned short, tagDISPPARAMS *, tagVARIANT *, tagEXCEPINFO *, unsigned int *); HRESULT STDMETHODCALLTYPE accHitTest(long xLeft, long yTop, VARIANT *pvarID); HRESULT STDMETHODCALLTYPE accLocation(long *pxLeft, long *pyTop, long *pcxWidth, long *pcyHeight, VARIANT varID); HRESULT STDMETHODCALLTYPE accNavigate(long navDir, VARIANT varStart, VARIANT *pvarEnd); HRESULT STDMETHODCALLTYPE get_accChild(VARIANT varChildID, IDispatch** ppdispChild); HRESULT STDMETHODCALLTYPE get_accChildCount(long* pcountChildren); HRESULT STDMETHODCALLTYPE get_accParent(IDispatch** ppdispParent); HRESULT STDMETHODCALLTYPE accDoDefaultAction(VARIANT varID); HRESULT STDMETHODCALLTYPE get_accDefaultAction(VARIANT varID, BSTR* pszDefaultAction); HRESULT STDMETHODCALLTYPE get_accDescription(VARIANT varID, BSTR* pszDescription); HRESULT STDMETHODCALLTYPE get_accHelp(VARIANT varID, BSTR *pszHelp); HRESULT STDMETHODCALLTYPE get_accHelpTopic(BSTR *pszHelpFile, VARIANT varChild, long *pidTopic); HRESULT STDMETHODCALLTYPE get_accKeyboardShortcut(VARIANT varID, BSTR *pszKeyboardShortcut); HRESULT STDMETHODCALLTYPE get_accName(VARIANT varID, BSTR* pszName); HRESULT STDMETHODCALLTYPE put_accName(VARIANT varChild, BSTR szName); HRESULT STDMETHODCALLTYPE get_accRole(VARIANT varID, VARIANT *pvarRole); HRESULT STDMETHODCALLTYPE get_accState(VARIANT varID, VARIANT *pvarState); HRESULT STDMETHODCALLTYPE get_accValue(VARIANT varID, BSTR* pszValue); HRESULT STDMETHODCALLTYPE put_accValue(VARIANT varChild, BSTR szValue); HRESULT STDMETHODCALLTYPE accSelect(long flagsSelect, VARIANT varID); HRESULT STDMETHODCALLTYPE get_accFocus(VARIANT *pvarID); HRESULT STDMETHODCALLTYPE get_accSelection(VARIANT *pvarChildren); HRESULT /* STDMETHODCALLTYPE*/ GetWindow(HWND *phwnd); HRESULT /* STDMETHODCALLTYPE */ ContextSensitiveHelp(BOOL fEnterMode); private: ULONG ref; QAccessibleInterface *accessible; };