c++ - Compiler Warning C4251: Problem exporting a class in a *.dll -


edit: forgive noobish-ness, haven't ever implemented wrapper .dll before! :s

i've been tinkering bit of released kinect sensor hacks (namely openkinect , openni) , i'm trying wrap functionality in *.dll use in various "test" programs hope write.

so far i've set *.dll project , have got lot of library functionality in, i'm getting c4251 compiler warnings on place.

in project settings i've got openni.lib file statically linked, far library header looks this:

#ifdef libkinect_exports #define libkinect_api __declspec(dllexport) #else #define libkinect_api __declspec(dllimport) #endif  // class exported libkinect.dll class libkinect_api clibkinect { public:      clibkinect(void);     ~clibkinect(void);      bool init(void);  protected:  private:      xn::context                     m_xcontext;     xn::depthgenerator              m_xdepthgen; }; 

and stdafx.h file contains:

#pragma once  #define win32_lean_and_mean             // exclude rarely-used stuff windows headers // windows header files: #include <windows.h>  #include <xnopenni.h> #include <xncodecids.h> #include <xncppwrapper.h> 

now i've attempted create windows console app test library , lots of error c2653: 'xn' : not class or namespace name errors. hoping in application have include , link wrapper *.dll not of openni stuff well, hide underlying implementation, incorrect?

since want hide fact using xn namespace in implementation, should not put in library header file. simplest way solve problem use pimpl idiom.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -