9
usando MinGW, sto cercando di collegare il mio codice C con una C statica libreria ++ che esegue alcune operazioni OLE:riferimenti non definito OLE in libreria esterna, anche durante il collegamento con libole32
mingw32-gcc main.o resources.o -o mbcom.exe -L../../Lib/Iup -liup -liupole -lole32 -lcomctl32 -lstdc++ -mwindows
Purtroppo, ottengo questo:
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x341): undefined reference to `IID_IOleControl'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x9b0): undefined reference to `IID_IViewObject2'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xcb5): undefined reference to `IID_IUnknown'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xce8): undefined reference to `IID_IPersistStorage'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xd1b): undefined reference to `IID_IOleObject'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xd9d): undefined reference to `IID_IUnknown'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xdbf): undefined reference to `IID_IOleClientSite'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xde1): undefined reference to `IID_IOleWindow'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xe03): undefined reference to `IID_IOleControlSite'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xe25): undefined reference to `IID_IDispatch'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0xe51): undefined reference to `IID_IOleInPlaceSite'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x1129): undefined reference to `GUID_NULL'
../../Lib/Iup/libiupole.a(tOleHandler.o):tOleHandler.cpp:(.text+0x124d): undefined reference to `GUID_NULL'
../../Lib/Iup/libiupole.a(tOleInPlaceSite.o):tOleInPlaceSite.cpp:(.text+0xc8): undefined reference to `IID_IOleInPlaceObject'
../../Lib/Iup/libiupole.a(tDispatch.o):tDispatch.cpp:(.text+0x108): undefined reference to `GUID_NULL'
../../Lib/Iup/libiupole.a(tDispatch.o):tDispatch.cpp:(.text+0x137): undefined reference to `[email protected]'
../../Lib/Iup/libiupole.a(tOleInPlaceFrame.o):tOleInPlaceFrame.cpp:(.text+0x1d9): undefined reference to `IID_IUnknown'
../../Lib/Iup/libiupole.a(tOleInPlaceFrame.o):tOleInPlaceFrame.cpp:(.text+0x211): undefined reference to `IID_IOleInPlaceUIWindow'
../../Lib/Iup/libiupole.a(tOleInPlaceFrame.o):tOleInPlaceFrame.cpp:(.text+0x22b): undefined reference to `IID_IOleWindow'
../../Lib/Iup/libiupole.a(tOleInPlaceFrame.o):tOleInPlaceFrame.cpp:(.text+0x245): undefined reference to `IID_IOleInPlaceFrame'
collect2: ld returned 1 exit status
mingw32-make: *** [mbcom.exe] Error 1
L'unica soluzione che riesco a trovare è quello di collegare con libole32, ma come potete vedere, sto già facendo.
Altre idee?
Questo ha funzionato, grazie! Mi chiedo perché i documenti della biblioteca non abbiano menzionato quelli. –
Salvato la mia giornata! :) – dom0
(per i follower, questo è "aggiungi -luuid -loleaut32 alla riga di collegamento" IIRC) – rogerdpack