I have a trouble when compile wrapper of cpgf is bellows:
#ifndef REFLECTION_WRAPPER_CLASS_H_
#define REFLECTION_WRAPPER_CLASS_H_
#include "cpgf/gmetadefine.h"
#include "cpgf/goutmain.h"
#include "cpgf/gmetafield.h"
#include "cpgf/gmetaenum.h"
#include "cpgf/gmetaannotation.h"
#include "cpgf/gmetaoperator.h"
#include "cpgf/gmetaproperty.h"
#include "cpgf/gvariant.h"
#include "REFLECTION_WRAPPER_PARAM_CLASS.h"
using namespace cpgf;
namespace COMMON
{
/**
* @brief The class takes responsibility like an adapter for using reflection
*/
class REFLECTION_WRAPPER_CLASS
{
/**
* @brief Deconstructor
*/
EXPORT virtual ~REFLECTION_WRAPPER_CLASS();
/**
* @brief Invoke to execute method
* @param refl_model The model keep parameters for executing reflection
*/
EXPORT static void execute(boost::shared_ptr<REFLECTION_WRAPPER_PARAM_CLASS> refl_model);
Common compile ok and common.lib, common.dll are generated.
But when I include REFLECTION_WRAPPER_CLASS.h in test_common project and I found error "REFLECTION_WRAPPER_CLASS.h(15) : fatal error C1083: Cannot open include file: 'cpgf/gmetadefine.h': No such file or directory".
I have included header of cpgf into test_common but I found error "cpgf\include\cpgf/gstdint.h(129) : error C2371: 'int_fast8_t' : redefinition; different basic types"
fatal error C1083: Cannot open include file: 'cpgf/gmetadefine.h': No such file or directory".
This is an include path problem.
I have included header of cpgf into test_common but I found error "cpgf\include\cpgf/gstdint.h(129) : error C2371: 'int_fast8_t' : redefinition; different basic types"
I don't know what gstdint.h is.
The common & test_common are dynamic library output and using same build command.
You've not provided enough information for me to comment on that. For example, are they different?
More importantly, you should not be exporting members of a class. You should export the whole class or nothing.