Results 1 to 15 of 15

Thread: Want to run Octave m-file

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Want to run Octave m-file

    That's great news norobro!

    I can't really get it to work here though...
    I run "ldconfig /usr/lib/octave-3.2.2" (after sudo) and only get a new prompt (the same response if I misspell) . nothing else happens and the same errors when compiling. Maybe there should be a -l or something in the command?


    /Tottish

    EDIT:
    WoHoo!
    Got it to work! I thought that the second thing you listed also had to be done for it to work. Thought it only applied after reboot, proves how new I am to this I guess! =)
    Anyway, a HUGE thank you from me to you!!!
    Last edited by Tottish; 1st April 2010 at 17:39.

  2. #2
    Join Date
    Feb 2008
    Posts
    491
    Thanks
    12
    Thanked 142 Times in 135 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Want to run Octave m-file

    Hmm, I thought that would work.
    No response is the expected behavior. It updates the cache. Try "ldconfig -p | grep octave:
    Qt Code:
    1. ldconfig -p | grep octave
    2. liboctinterp.so (libc6) => /usr/lib/octave-3.2.4/liboctinterp.so
    3. liboctave.so (libc6) => /usr/lib/octave-3.2.4/liboctave.so
    4. libcruft.so (libc6) => /usr/lib/octave-3.2.4/libcruft.so
    To copy to clipboard, switch view to plain text mode 
    I had this problem trying to implement qwt. I don't understand why putting the libs with -L and -l in the Makefile doesn't work, but I tried a lot of different combinations to no avail. Maybe someone can enlighten me(us).

  3. #3
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Want to run Octave m-file

    WoHoo!
    Got it to work! I thought that the second thing you listed also had to be done for it to work. Thought it only applied after reboot, proves how new I am to this I guess! =)
    Anyway, a HUGE thank you from me to you!!
    Still tricking around a little though but the major errors are GONE! I'll keep you posted.
    /Tottish

    EDIT: It works! Runs perfectly... Now row to implement my nonlinear optimization algorithm. =) Hmmm. I wonder if global variables work with this method... Probably not since they are most likely not contained within the library...
    Last edited by Tottish; 1st April 2010 at 18:10.

  4. #4
    Join Date
    Mar 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Want to run Octave m-file

    Quote Originally Posted by Tottish View Post
    WoHoo!
    Got it to work! I thought that the second thing you listed also had to be done for it to work. Thought it only applied after reboot, proves how new I am to this I guess! =)
    Anyway, a HUGE thank you from me to you!!
    Still tricking around a little though but the major errors are GONE! I'll keep you posted.
    /Tottish

    EDIT: It works! Runs perfectly... Now row to implement my nonlinear optimization algorithm. =) Hmmm. I wonder if global variables work with this method... Probably not since they are most likely not contained within the library...
    Hi,
    I'm working with Windows and cannot adapt your advice from the Linux-world. Sorry!
    I get lots of udefined reference errors, and don't know where to put some correct paths to libraries to solve the problem. Maybe you can help me?
    Thanks!

    Starting: C:/Qt/2010.02.1/mingw/bin/mingw32-make.exe -w
    mingw32-make: Entering directory `C:/Qt/ExamplesFromOthers/Octave_integration'
    C:/Qt/2010.02.1/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/Qt/ExamplesFromOthers/Octave_integration'
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\2010.02.1\qt\include\QtCore" -I"..\..\2010.02.1\qt\include" -I"..\..\..\Octave\3.2.4_gcc-4.4.0\include" -I"..\..\..\Octave\3.2.4_gcc-4.4.0\include\octave-3.2.4\octave" -I"..\..\2010.02.1\qt\include\ActiveQt" -I"debug" -I"..\..\2010.02.1\qt\mkspecs\win32-g++" -o debug\main.o main.cpp
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,console -mthreads -Wl -o debug\test2.exe debug/main.o -L"c:\Qt\2010.02.1\qt\lib" -LC:\Octave\3.2.4_gcc-4.4.0\lib -loctinterp -LC:\Octave\3.2.4_gcc-4.4.0\bin -loctinterp -lQtCored4
    mingw32-make[1]: Leaving directory `C:/Qt/ExamplesFromOthers/Octave_integration'
    mingw32-make: Leaving directory `C:/Qt/ExamplesFromOthers/Octave_integration'
    debug/main.o: In function `main':
    C:\Qt\ExamplesFromOthers\Octave_integration/main.cpp:28: undefined reference to `MatrixType::MatrixType()'
    C:\Qt\ExamplesFromOthers\Octave_integration/main.cpp:28: undefined reference to `MatrixType::~MatrixType()'
    C:\Qt\ExamplesFromOthers\Octave_integration/main.cpp:28: undefined reference to `MatrixType::~MatrixType()'
    C:\Qt\ExamplesFromOthers\Octave_integration/main.cpp:34: undefined reference to `operator<<(std:stream&, Matrix const&)'
    ... etc ...

  5. #5
    Join Date
    Mar 2010
    Posts
    77
    Thanks
    17
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Want to run Octave m-file

    Hi!
    I'm no wiz at this but to me it doesn't seem like an Octave specific problem so I'm sure you can get more experienced help from others reading this if my tip is wrong/doesn't work.

    You might need something like this in your .pro-file:
    Qt Code:
    1. OCTAVE_LOCATION = C:\path\to\octave
    2. INCLUDEPATH += $${OCTAVE_LOCATION}/path/to/sources
    3. LIBS = -L$${OCTAVE_LOCATION}/path/to/libs \
    4. -loctinterp #(or whatever the name of the library(s?) you want to use.
    To copy to clipboard, switch view to plain text mode 

    Also, try to remember to wrap the code/compiler output you post in CODE tags for increased readability and to avoid smilies. (Use the pound sign from the toolbar).
    Welcome to the Forum and Good luck! Just hang in there, google 'til your eyes bleed, read any official documentation and you'll crack it.
    Peace Out!
    /Tottish

  6. #6
    Join Date
    Dec 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Android

    Default Re: Want to run Octave m-file

    Hello, sorry to revive this old thread, but is the only reference I have found about using Qt and Octave together.

    I'm currently developing an application that uses Octave to do some signal processing to an audio signal (including loading and playing it) and Qt as the GUI.

    I'm having trouble when running octave embedded in a Qt project as one of the Octave functions used in my process, hanning() is returning only zeros.

    This doesn't happen if I embed without Qt.

    If you can help me or guide me where I can get more help, thank you very much.

  7. #7
    Join Date
    Dec 2012
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Android

    Default Re: Want to run Octave m-file

    The problem I was having is related to the version 3.2 of Octave. Testing the program with the 3.6 version everything works fine so far.

Similar Threads

  1. Replies: 5
    Last Post: 15th June 2010, 07:42
  2. Replies: 3
    Last Post: 28th March 2009, 15:37
  3. Replies: 0
    Last Post: 6th March 2009, 08:19
  4. Replies: 2
    Last Post: 2nd April 2008, 17:28
  5. Replies: 3
    Last Post: 25th May 2007, 07:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.