Hello Ole,
The "Quick example step by step" is incomplete. You need to add:
precompiled.h:
#ifndef _QX_TEST_PRECOMPILED_HEADER_H_
#define _QX_TEST_PRECOMPILED_HEADER_H_
#include <QxOrm.h>
#include "export.h"
#endif // _QX_TEST_PRECOMPILED_HEADER_H_
#ifndef _QX_TEST_PRECOMPILED_HEADER_H_
#define _QX_TEST_PRECOMPILED_HEADER_H_
#include <QxOrm.h>
#include "export.h"
#endif // _QX_TEST_PRECOMPILED_HEADER_H_
To copy to clipboard, switch view to plain text mode
export.h
#ifndef _MY_TEST_EXE_EXPORT_H_
#define _MY_TEST_EXE_EXPORT_H_
#ifdef _BUILDING_MY_TEST_EXE
#define MY_TEST_EXE_DLL_EXPORT QX_DLL_EXPORT_HELPER
#else // _BUILDING_MY_TEST_EXE
#define MY_TEST_EXE_DLL_EXPORT QX_DLL_IMPORT_HELPER
#endif // _BUILDING_MY_TEST_EXE
#ifdef _BUILDING_MY_TEST_EXE
#define QX_REGISTER_HPP_MY_TEST_EXE QX_REGISTER_HPP_EXPORT_DLL
#define QX_REGISTER_CPP_MY_TEST_EXE QX_REGISTER_CPP_EXPORT_DLL
#else // _BUILDING_MY_TEST_EXE
#define QX_REGISTER_HPP_MY_TEST_EXE QX_REGISTER_HPP_IMPORT_DLL
#define QX_REGISTER_CPP_MY_TEST_EXE QX_REGISTER_CPP_IMPORT_DLL
#endif // _BUILDING_MY_TEST_EXE
#endif // _MY_TEST_EXE_EXPORT_H_
#ifndef _MY_TEST_EXE_EXPORT_H_
#define _MY_TEST_EXE_EXPORT_H_
#ifdef _BUILDING_MY_TEST_EXE
#define MY_TEST_EXE_DLL_EXPORT QX_DLL_EXPORT_HELPER
#else // _BUILDING_MY_TEST_EXE
#define MY_TEST_EXE_DLL_EXPORT QX_DLL_IMPORT_HELPER
#endif // _BUILDING_MY_TEST_EXE
#ifdef _BUILDING_MY_TEST_EXE
#define QX_REGISTER_HPP_MY_TEST_EXE QX_REGISTER_HPP_EXPORT_DLL
#define QX_REGISTER_CPP_MY_TEST_EXE QX_REGISTER_CPP_EXPORT_DLL
#else // _BUILDING_MY_TEST_EXE
#define QX_REGISTER_HPP_MY_TEST_EXE QX_REGISTER_HPP_IMPORT_DLL
#define QX_REGISTER_CPP_MY_TEST_EXE QX_REGISTER_CPP_IMPORT_DLL
#endif // _BUILDING_MY_TEST_EXE
#endif // _MY_TEST_EXE_EXPORT_H_
To copy to clipboard, switch view to plain text mode
and a pro file like:
TEMPLATE = app
TARGET = test
CONFIG += precompile_header
PRECOMPILED_HEADER = precompiled.h
INCLUDEPATH += /usr/local/QxOrm/include
LIBS += -L/usr/local/QxOrm/lib -lQxOrm
# Input
HEADERS += drug.h
SOURCES += drug.cpp main.cpp
TEMPLATE = app
TARGET = test
CONFIG += precompile_header
PRECOMPILED_HEADER = precompiled.h
INCLUDEPATH += /usr/local/QxOrm/include
LIBS += -L/usr/local/QxOrm/lib -lQxOrm
# Input
HEADERS += drug.h
SOURCES += drug.cpp main.cpp
To copy to clipboard, switch view to plain text mode
Bookmarks