我正在使用 C++ 与带有 H3D 工具包的 Sensable Phantom Omni 触觉设备建立连接。这些代码行给了我一些挑战,并且不会成功编译:
#include <H3D/PhantomDevice.h>
#include <HAPI/PhantomHapticsDevice.h>
using namespace H3D;
...
H3DNodeDatabase PhantomDevice::database("PhantomDevice", &(newInstance<PhantomDevice>),typeid(PhantomDevice),&H3DHapticsDevice::database); //line 36
namespace PhantomDeviceInternals {...}
unsigned int PhantomDevice::nr_initialized_devices = 0; //line 60
bool PhantomDevice::started_scheduler = false; //line 61
unsigned int PhantomDevice::render_shapes_called = 0; //line 62
...
产生的错误消息是:
我有以下错误:
PhantomDevice.cpp:36: error: definition of static data member 'H3D::PhantomDevice::database' of dllimport'd class.
PhantomDevice.cpp:60: error: definition of static data member 'H3D::PhantomDevice::nr_initialized_devices' of dllimport'd class.
PhantomDevice.cpp:61: error: definition of static data member 'H3D::PhantomDevice::started_scheduler' of dllimport'd class.
PhantomDevice.cpp:62: error: definition of static data member 'H3D::PhantomDevice::render_shapes_called' of dllimport'd class.
make.exe: *** [PhantomDevice.o] Error 1
请任何人都可以提出建议,因为我现在陷入困境。