Associating GUIDs with classes

From LSDevLinux
Revision as of 07:08, 30 July 2012 by Mayhewn (talk | contribs) (Reverted edits by KevinAlexander (Talk) to last revision by LSDevManager)

Jump to: navigation, search

When compiling, you may get an error message such as

FieldWorks/Src/Cellar/FwXmlData.cpp:25: undefined reference to `__interface_traits<FwXmlData>::uuid'

It's confused at the usage of CLSID_FwXmlData. If you inspect the FieldWorks/Output/Common/FwCellarTlb.h, you will see

#define CLSID_FwXmlData __uuidof(FwXmlData)

To define the needed GUID-class association, you could use a line such as

template<> const GUID __uuidof(FwXmlData)("2F0FCCC2-C160-11d3-8DA2-005004DEFEC4");

But in this case, the GUID definition should get generated by processing the FwCellarTlb.h file.

Process FooTlb.h

Currently (20070411), extract_iids.sh is in COM/test.

FieldWorks/Output/Common$ extract_iids.sh FwCellarTlb.h > ../../Src/Cellar/Cellar_GUIDs.cpp

The build process will do this automatically in the future.