When I want to compile a simple file within debea 1.2.4, I matched below
compile error:
[BCC32 Error] File1.cpp(23): E2031 Cannot cast from 'std::string Foo::*'
to 'char *'
[BCC32 Error] File1.cpp(26): E2031 Cannot cast from 'int Foo::*' to 'char *'
[BCC32 Error] File1.cpp(95): E2451 Undefined symbol 'pEx'
class Foo : public dba::Storeable {
DECLARE_STORE_TABLE();
public:
int mIntVal;
std::string mStrVal;
};
error happen at:
BEGIN_STORE_TABLE(Foo, dba::Storeable, "foo_table")
BIND_STR(Foo::mStrVal,dba::String,"strval") **
BIND_INT(Foo::mIntVal,dba::Int,"intval") **
END_STORE_TABLE()
The BIND_STR macro is defined in the header file storeable.h:
#define BIND_DAT(member,filter_class,field) \
new dba::StoreTableMember(st_table,field,(char*)&(member) -
(char*)this,new filter_class(member),dba::Database::DATE);
so the problem is when compile
(char*)&(Foo::mStrVal)
how can I fix this problem?