jing-interactive / OpenDepthSensor

Open library to support Kinect V1 & V2 & Azure, RealSense and OpenNI-compatible sensors.
MIT License
72 stars 10 forks source link

Undefined symbols for architecture x86_64: "ds::Device::create(ds::DeviceType, ds::Option)" #4

Open wangyangwang opened 6 years ago

wangyangwang commented 6 years ago

just trying to build a simple HelloWorld app using depth sensor. since i cannot find a documentation or sample anywhere, I just started with some simple code:

#include "DepthSensor.h"

ds::DeviceRef mDevice;

void depthApp::setup()
{
    ds::DeviceType type = ds::DeviceType(0);
    ds::Option option;
    option.enableDepth = true;
    option.enableInfrared = false;

    mDevice = ds::Device::create(type, option);
// mDevice = ds::Device::create(type);

}

this line mDevice = ds::Device::create(type, option); gives me this error:

Undefined symbols for architecture x86_64: "ds::Device::create(ds::DeviceType, ds::Option)", referenced from: depthApp::setup() in depthApp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

The project was freshly built using Tinderbox, the code I posted above is really the only thing I added.

I am not sure if this is caused by the Block or my build settings or my misuse of the library. Since I am relatively new to c++, I apologize if this is not an issue to this repo.

vinjn commented 6 years ago

Have you built Cinder-DepthSensor.lib? https://github.com/jing-interactive/Cinder-DepthSensor#how-to-build

wangyangwang commented 6 years ago

sorry for some reason I overlooked the how-to-build part. after the clone i just went straight to TinderBox, I haven't tried but I think this should fix it!

iltimasd commented 6 years ago

gonna jump on this thread. I've tried the above code to get started but also running into probelms. I have built, but perhaps theres steps im missing. could you please be more specific on how the build is supposed to be done.

Also do you have any sample/example code just to see how to get up and running

luisarandas commented 5 years ago

The project generated in premake in xcode doesn't allow to run as application. Any insight on this?