D
Duncan Smith
I have a VS2005 C++ MFC project which #imports a type library. The
goal is to introduce some managed code eventually, but for starters I
just need to set the /clr compiler option and build the project.
The type library is imported like so:
#import <LtipClient.tlb> no_namespace named_guids
With the /clr switch on, I got lots of LNK2028 errors, so I added the
following directive to the top of each cpp source file
#pragma unmanaged
and I now get lots of LNK2001 and LNK2019 linker errors (see below)
I thought that unmanaged code should be able to use the COM objects as
normal? If I remove the /clr switch the project compiles just fine..
3>CommonView.obj : error LNK2019: unresolved external symbol "public:
long __thiscall ILTIPDataProvider:ispatchMessage(struct ILTIPMessage
*)" (?DispatchMessage@ILTIPDataProvider@@QAEJPAUILTIPMessage@@@Z)
referenced in function "public: void __thiscall
CCommonView::FeedHistory(void)" (?FeedHistory@CCommonView@@QAEXXZ)
3>Penelope.obj : error LNK2001: unresolved external symbol "public:
long __thiscall ILTIPDataProvider:ispatchMessage(struct ILTIPMessage
*)" (?DispatchMessage@ILTIPDataProvider@@QAEJPAUILTIPMessage@@@Z)
goal is to introduce some managed code eventually, but for starters I
just need to set the /clr compiler option and build the project.
The type library is imported like so:
#import <LtipClient.tlb> no_namespace named_guids
With the /clr switch on, I got lots of LNK2028 errors, so I added the
following directive to the top of each cpp source file
#pragma unmanaged
and I now get lots of LNK2001 and LNK2019 linker errors (see below)
I thought that unmanaged code should be able to use the COM objects as
normal? If I remove the /clr switch the project compiles just fine..
3>CommonView.obj : error LNK2019: unresolved external symbol "public:
long __thiscall ILTIPDataProvider:ispatchMessage(struct ILTIPMessage
*)" (?DispatchMessage@ILTIPDataProvider@@QAEJPAUILTIPMessage@@@Z)
referenced in function "public: void __thiscall
CCommonView::FeedHistory(void)" (?FeedHistory@CCommonView@@QAEXXZ)
3>Penelope.obj : error LNK2001: unresolved external symbol "public:
long __thiscall ILTIPDataProvider:ispatchMessage(struct ILTIPMessage
*)" (?DispatchMessage@ILTIPDataProvider@@QAEJPAUILTIPMessage@@@Z)