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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:43:08+00:00 2026-05-27T13:43:08+00:00

This is my first question here, so sorry in forward if it is not

  • 0

This is my first question here, so sorry in forward if it is not well formulated or stupid.

I am trying to use the octave libraries with C++

I am using Qt creator on Ubuntu (linux noob)

#include "octave/oct.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    Matrix matrix(3,4);

    return a.exec();
}

At first I got some undefined references errors. I figured out the program is missing libraries, so I looked for the library “liboctave.so”. I found it in usr/lib/octave-3.2.4. To be more precise there was a symbolic link named “liboctave.so” pointing to “liboctave.so.3.2.4” file. I used the QtCreators “add Library” feature to add the library to my project. The program generated this code in my .pro file

unix:!macx:!symbian: LIBS += -L$$PWD/../../../../usr/lib/octave-3.2.4/ -loctave

INCLUDEPATH += $$PWD/../../../../usr/lib/octave-3.2.4
DEPENDPATH += $$PWD/../../../../usr/lib/octave-3.2.4

The program built without error. Not even complaining about undefined references. But when I run it I get

Starting /home/martin/Projects/test-build-desktop/test…

/home/martin/Projects/test-build-desktop/test: error while loading shared libraries: liboctave.so: cannot open shared object file: No such file or directory
/home/martin/Projects/test-build-desktop/test exited with code 127

I cannot figure out why it cannot find the file. I am looking at the file with my bare eyes.

I figured out that the problem may be permission, so I copied the “liboctave.so.3.2.4” file to the project location, renamed it “liboctave.so” and added all permissions for everybody. Then added this library using the Qtcreator “add library” feature and I still get the same error.

Please help me

  • 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-05-27T13:43:08+00:00Added an answer on May 27, 2026 at 1:43 pm

    The liboctave is not installed in standard location, when you compile it your povide
    a parameter -L$$PWD/../../../../usr/lib/octave-3.2.4/ however in the run
    time it is not known.

    So you have two options:

    1. Provide environment variable LD_LIBRARY_PATH=/full/path/to/usr/lib/octave-3.2.4 and then run the program:

      export LD_LIBRARY_PATH=/full/path/to/usr/lib/octave-3.2.4
      
    2. Hardcode the path withing excutable using an additional option: -Wl,-rpath=$$PWD/../../../../usr/lib/octave-3.2.4/

      And it would search for it in this location.

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

Sidebar

Related Questions

Sorry, this's my first time to ask a question here. So, I don't have
this is my first question here so I hope I can articulate it well
this is my first question here :) I know that I should not check
this is my first question to stackoverflow so here it goes... I use cruise
this is my first question here so sorry if I do something wrong or
this is my first question here and if its format is not what is
first question here, this is regarding the iPhoneOS3 not MacOSX. I am fairly new
this is my first question in stackoverflow. I am trying to use PHPExcel to
First sorry for posting this here.I just got no answer to this question on
This is my first question here :D, first sorry about my english. My question

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.