09 September 2017 0 4K Report

https://stackoverflow.com/questions/46107631/error-with-h3dnodedatabase-phantomdevicedatabase-in-phantomdevice-cpp

I am using C++ to establish a connection with Sensable Phantom Omni haptic device with H3D toolkit. These lines of code give me some challenges and will not compile successfully:

#include

#include

using namespace H3D;

...

H3DNodeDatabase PhantomDevice::database("PhantomDevice", &(newInstance),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

...

The resulting error messages are:

I have the following errors:

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

Please anyone can suggest what to do as I am stuck in the mud now.

I have asked this question on Stackflow via: https://stackoverflow.com/questions/46107631/error-with-h3dnodedatabase-phantomdevicedatabase-in-phantomdevice-cpp

https://stackoverflow.com/questions/46107631/error-with-h3dnodedatabase-phantomdevicedatabase-in-phantomdevice-cpp

Similar questions and discussions