I'm trying use ODB in my program to save a class that contains CString type (a MFC variable type). When I compile the include file with ODB, it tell me the 'CString' does not name a type.
There is 2 ways I think can solve it. I tried but failed. 1、Let ODB support the CString type I write a CString-traits.hxx reference the qt example and this web (https://www.codesynthesis.com/~boris/blog/2012/07/18/custom-database-to-cxx-type-mapping-in-odb/),when I compile with ODB, the compiler want the CString support include file. I give the include file path, but the compiler want more include file that from the CString include file, and it appears more unsupport type. I think there must be sth wrong because it's so inconvenient.
2、Let ODB compiler ignore the 'CString' word I add the '#pragma db transient' before the CString, like below:
#pragma db transient
CString name;
but the odb compiler also tell me the CString not name a type.
After all, my question is: 1、How can ODB support CString? 2、How can ODB compiler ignore particular sentence, such as sentence contains 'CString'?
Thinks