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 9150245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T11:35:13+00:00 2026-06-17T11:35:13+00:00

I’m trying to compile an run a very basic program given below (test.cpp) which

  • 0

I’m trying to compile an run a very basic program given below (test.cpp) which calls the OpenNI class. You can see the files and dirs they’re in here. Sorry that some characters screws up a little bit in the browser’s encoding. I’m using the linux command: tree, if you know a better command tell me and I will update it.

File Structure

I’m following the guide here, see “GCC / GNU Make”.

#include < stdio.h > 
#include < OpenNI.h > 

using namespace openni; 

int 
main ( void ) 
{ 
    Status rc = OpenNI::initialize(); 

    if (rc != STATUS_OK) 
    { 
        printf("\nInitialize failed\n%s\n", OpenNI::getExtendedError()); 
        return 1; 
    } 

    printf("Hello, world!\n"); 
    return 0; 
} 

Here is what I’m running in the command line to compile it (gcc 4.7.2):

gcc test.cpp -I../OpenNI-2.0.0/Include -L/home/evan/Code/OpenNi/Init -l OpenNI2 -o test 

This works fine but when I run ./test I get the following error:

Initialize failed 
DeviceDriver: library handle is invalid for file libOniFile.so 
Couldn't understand file 'libOniFile.so' as a device driver 
DeviceDriver: library handle is invalid for file libPS1080.so 
Couldn't understand file 'libPS1080.so' as a device driver 
Found no valid drivers in './OpenNI2/Drivers' 

Thanks, any help would be much appreciated.

  • 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-17T11:35:14+00:00Added an answer on June 17, 2026 at 11:35 am

    Instructions from your guide says, that

    It is highly suggested to also add the “-Wl,-rpath ./” to your linkage command. Otherwise, the runtime linker will not find the libOpenNI.so file when you run your application. (default Linux behavior is to look for shared objects only in /lib and /usr/lib).

    It seems you have exactly this problem — it can not find some libraries. Try to add proper rpath (seems to be /home/evan/Code/OpenNi/Init/OpenNI2/Drivers in your case) to your compilation string.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I would like to run a str_replace or preg_replace which looks for certain words
I'm trying to select an H1 element which is the second-child in its group
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am writing an app for my school newspaper, which is run completely online
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
I am trying to render a haml file in a javascript response like so:

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.