Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7853561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:44:11+00:00 2026-06-02T19:44:11+00:00

I am trying to setup a simple program to use OpenKinect to connect a

  • 0

I am trying to setup a simple program to use OpenKinect to connect a Kinect and somehow test the communication to my laptop. I can run the demos fine, but I want to test it through code to make sure I know whats going on. So far I am still unable to connect it. The code as of now is –

#include "/usr/local/include/libfreenect.hpp"
#include <iostream>
using namespace std;
Freenect::FreenectDevice::FreenectDevice* device; 

int main(int argc, char** argv) {
    Freenect::Freenect k;
    device = &k.createDevice<Freenect::FreenectDevice>(0);  //line 8
    cout<<"\ndeviceCount:"<<k.deviceCount();
    return 0;
}

When I compile, it tells me

    In member function ‘ConcreteDevice& Freenect::Freenect::createDevice(int) [with ConcreteDevice = Freenect::FreenectDevice]’:
test_kinect.cpp:8:   instantiated from here

libfreenect.hpp:196: error: cannot allocate an object of abstract type ‘Freenect::FreenectDevice’

So the FreenectDevice class is abstract…well how am I supposed to create a device then? Am I expected to write my own class that inherits this one whenever I want to use OpenKinect? I’m very confused about how to actually use the code this library provides. I have been searching for some kind of basic tutorial, but have found nothing. If someone knows of a good tutorial, that would be the best thing for me right now. Any help is appreciated, thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:44:13+00:00Added an answer on June 2, 2026 at 7:44 pm

    Well, yes, you’ll need to inherit FreenectDevice and implement the two callbacks (VideoCallback and DepthCallback) that will receive the video and depth information that the Kinect registers.

    The problem with examples is that there have been API changes over the lifetime of the library, so they may not all be working with the current version. Your best bet for working example code is the C++ wrapper section of the OpenKinect Wiki which has two (hopefully) current samples, and cppview.cpp included in the source distribution of libfreenect itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compile a simple c++ program to run inside ESXi 3.5 console
trying to run this program. I think that to setup all of the web
I'm trying to setup a simple timer that gets started from a Rails Application.
In an academic project I'm trying to setup a simple physics engine. I am
I'm trying to make a simple base war which includes all the boilerplate setup
I'm trying to set up a simple Roles model for my site. Users can
So I am trying to run console 64 bit Hello World program. I have
I'm trying to make a simple program to change IP parameters in C#. I
I am trying to run the sample helloworld program for quartz scheduling given on
I'm trying to compile a very simple program that makes a connection to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.