[odb-users] how can ODB support CString in MFC

Boris Kolpackov boris at codesynthesis.com
Wed Oct 31 08:29:42 EDT 2018


Jerry <kexuetutu at sina.com> writes:

> How can ODB support CString?

The ODB compiler is based on GCC (MinGW version on Windows). To be able
to persist CString you will need to somehow make GCC MinGW be able to
include and compile MFC headers. Whether this is doable (and, if so, how)
I have no idea.

Overall, my suggestion would be to not use CString/MFC in the object
model that you wish to persist with ODB.


> How can ODB compiler ignore particular sentence, such as sentence
> contains 'CString'?

There is the ODB_COMPILER macro for that:

class object
{

#ifndef ODB_COMPILER
  CString data;
#endif

};



More information about the odb-users mailing list