Results 1 to 5 of 5

Thread: Calling Scilab from Qt under Linux

  1. #1
    Join Date
    Jun 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Calling Scilab from Qt under Linux

    I'm trying to link (by CallScilab APIs) a C++ Qt project to scilab environment. I'd like to know how to set .pro file (INCLUDEPATH, LIBS ...) to perform this link. I'm using Linux Scilab 5.1.1 (following Ubuntu 9.10 default installation), but I'm interested to newest versions (5.2, 5.3) procedure too.

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Calling Scilab from Qt under Linux

    I suggest to read the qmake manual.

    In general in INCLUDEPATH you have to set the path (relative or absolute) where you can find header files, in LIBS you have to set both the path and the name of libraries to find.

    If you read this example you have to set

    Qt Code:
    1. INCLUDEPATH += $${PATH_SCILAB}/include/scilab
    2. LIBS += -L$${PATH_SCILAB}/lib/scilab/ -lscilab
    To copy to clipboard, switch view to plain text mode 
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Jun 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Calling Scilab from Qt under Linux

    So far I've tried the settings

    INCLUDEPATH += /usr/include/scilab/call_scilab
    INCLUDEPATH += /usr/include/scilab/core
    INCLUDEPATH += /usr/include/scilab

    LIBS += /usr/lib/scilab/libscilab.so
    LIBS += /usr/lib/scilab/libscicall_scilab.so
    LIBS += /usr/lib/scilab/libjavasci.so

    without results (I get undefined reference to callscilab APIs errors). What is wrong?

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Calling Scilab from Qt under Linux

    You want to perform dynamic linking, so I think LIBS should be more like:
    Qt Code:
    1. LIBS += /usr/lib/scilab/
    2. LIBS += -lscilab
    3. LIBS += -lscicall_scilab
    4. LIBS += -ljavasci
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jun 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Calling Scilab from Qt under Linux

    Still no results. For the sake of simplicity, I took readwritewmatrix_vc project from call_scilab/basicExamples folder and I built it, with the same issue ("undefined reference to..."). Note building on WinXp works fine. It would be very useful if someone having developed such a Linux project would post all config details, I've found lots of abstract documentation but only Win OS concrete code examples.

Similar Threads

  1. difference between source in Qt for X11/Linux Qt for Embedded Linux
    By sanjeet in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 7th June 2011, 02:58
  2. Scilab, plots and inqualities
    By kornicameister in forum General Discussion
    Replies: 0
    Last Post: 30th April 2011, 16:02
  3. Calling a webservice
    By steg90 in forum Qt Programming
    Replies: 8
    Last Post: 17th December 2007, 18:29
  4. Calling Webservices from QT4
    By Declan in forum Qt Programming
    Replies: 2
    Last Post: 14th April 2007, 08:04
  5. Calling QApplication from a Non-QT app?
    By hickscorp in forum Qt Programming
    Replies: 2
    Last Post: 10th April 2007, 22:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.