Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. php and c application data exchange .so lib linkage problem
Qt 6.11 is out! See what's new in the release blog

php and c application data exchange .so lib linkage problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 263 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JacobNovitsky
    wrote last edited by
    #1

    I use below structure for my distributed c/c/qt app which uses multiple .so libs.
    I'm testing some possibilities of php and web interface and facing below problem:

    /home/j/OSL/build/lib/libOSL.so

    I'm making web interface for my engine and learning how to exchange data.

    I use below command to interfere with my C application

    <?php

    function sendRequestC() {
    exec('/opt/lampp/htdocs/app/EXN/build/EXN 1 2 3, $output, $retval);
    }
    ?>

    If I dont link any .so libs its works as designed

    I usually face LD_EXPORT problem using distrubuted .so libs for my c/cpp apps.

    But currently I tested it to be visible with my ld environment:

    echo $LD_LIBRARY_PATH=/home/j/OSL/build/lib

    Also it is visible through regular c application call

    /opt/lampp/htdocs/app/EXN/build/EXN

    return value: 1

    When I call php script it returns nothing.
    Usually if session is fine, I get array returned from C program.

    qt pro file:
    
    TEMPLATE = app
    CONFIG += c
    TARGET = EXN
    
    DESTDIR = /opt/lampp/htdocs/app/EXN/build
    
    
    
    HEADERS += \
      
       
    
    SOURCES += \
       
    	main.c
    
    
    INCLUDEPATH += /opt/lampp/htdocs/app/EXN/OSL
    
    # /opt/lampp/htdocs/app/EXN/lib/libOSL.so
    
     LIBS += -L/opt/lampp/htdocs/app/EXN/lib/ -lOSL -ldl
    
    
    QMAKE_LFLAGS += -pthread
    
    
    QMAKE_CFLAGS_DEBUG   += -O0 -g
    QMAKE_CFLAGS_RELEASE += -O2 -DNDEBUG
    
    DISTFILES += \
        ../../../opt/lampp/htdocs/app/EXN/libOSL.so
    

    apache, xampp server

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      What do you mean by web interface ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved