my export.h
- Code: Select all
#ifndef ESF_EASYORDR_EXPORT_H
#define ESF_EASYORDR_EXPORT_H
#include <QxOrm.h>
#ifdef BUILDING_EASYORDR
#define ESF_EASYORDR_EXPORT QX_DLL_EXPORT_HELPER
#else // BUILDING_EASYORDR
#define ESF_EASYORDR_EXPORT QX_DLL_IMPORT_HELPER
#endif // BUILDING_EASYORDR
#ifdef BUILDING_EASYORDR
#define QX_REGISTER_HPP_ESF_EASYORDR QX_REGISTER_HPP_EXPORT_DLL
#define QX_REGISTER_CPP_ESF_EASYORDR QX_REGISTER_CPP_EXPORT_DLL
#else // BUILDING_EASYORDR
#define QX_REGISTER_HPP_ESF_EASYORDR QX_REGISTER_HPP_IMPORT_DLL
#define QX_REGISTER_CPP_ESF_EASYORDR QX_REGISTER_CPP_IMPORT_DLL
#endif // BUILDING_EASYORDR
#endif // ESF_EASYORDR_EXPORT_H
- Code: Select all
#ifndef MANDATOR_H
#define MANDATOR_H
#include <core/precompiled.h>
class ESF_EASYORDR_EXPORT Mandator
{
public:
Mandator();
static void registerOrm (qx::QxClass<Mandator> & t);
public:
long m_id;
QString m_name;
};
QX_REGISTER_HPP_ESF_EASYORDR(Mandator, qx::trait::no_base_class_defined, 1)
typedef QSharedPointer<Mandator> Mandator_ptr;
typedef qx::QxCollection<QString, Mandator_ptr> list_Mandator;
#endif // MANDATOR_H
- Code: Select all
#include <core/mandator.h>
QX_REGISTER_CPP_ESF_EASYORDR(Mandator)
namespace qx {
template <> void register_class(QxClass<Mandator> & t)
{
Mandator::registerOrm(t);
}}
Mandator::Mandator()
{
}
void Mandator::registerOrm(qx::QxClass<Mandator> &t)
{
t.id(& Mandator::m_id, "id");
t.data(& Mandator::m_name, "fldName");
}
And i always get this error:
- Code: Select all
src/core/mandator.cpp:3:1: error: expected identifier before string constant
src/core/mandator.cpp:3:1: error: expected ‘,’ or ‘...’ before string constant
src/core/mandator.cpp:3:1: error: expected constructor, destructor, or type conversion before ‘qx’
Any idea whats the cause for that error?
regards zbenjamin