[Qt-interest] Exporting function
Steven Doerfler
sgd-qt at lugaru.com
Thu Mar 4 22:57:23 CET 2010
On 3/4/2010 4:31 PM, André Hänsel wrote:
> No matter how you call it, MY_EXPORT, Q_DECL_EXPORT or
> __declspec(dllexport), it produces the same error (sure, it's the same!):
>
> extern "C" HRESULT COMSHARED_EXPORT __stdcall DllGetClassObject(REFCLSID
> objGuid, REFIID factoryGuid, LPVOID *factoryHandle)
> -> Redefinition; different linkage
>
If this is a compiler error, then the compiler is seeing two different
declarations for this function. It's complaining that the other one
doesn't match. Find the other one.
Maybe try adding a flag like gcc's -E or cl.exe's /P or /E to generate
preprocessed output. Then search it for all references to
DllGetClassObject. If one declaration uses __declspec(dllexport) (for
example) then all other the declarations and definitions in that
compilation unit should too.
Steven
More information about the Qt-interest-old
mailing list