Associating GUIDs with classes

From LSDevLinux
Revision as of 23:19, 4 August 2012 by Mayhewn (talk | contribs) (Reverted edits by LindaHayes (Talk) to last revision by Mayhewn)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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), is in COM/test.

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

The build process will do this automatically in the future.