Results 1 to 11 of 11

Thread: qsharedmemory between Qt and c program on linux plateform

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2012
    Posts
    5
    Platforms
    Unix/X11

    Default Re: qsharedmemory between Qt and c program on linux plateform

    Thank you wysota for help
    but, i want to know if i should use the Qsahredmemory functions(create(),setkey(),attach(),lock()) or shm functions (chmget(),shmat()...); personnaly i prefer use the first choice because it's more simple and acces management to the memory respected.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qsharedmemory between Qt and c program on linux plateform

    It doesn't matter as long as you interchange APIs that are compatible. What Qt does is it takes a file path you pass as the key, calls ftok() on it (with 'Q' as the proj_id parameter) and then uses the result with shmget(). Your code bypasses the first two steps thus you don't have a valid key.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. My first Linux QT program wont compile
    By GrahamLabdon in forum Newbie
    Replies: 1
    Last Post: 27th October 2010, 15:49
  2. How to shutdown Linux machine from QT Program?
    By Kevin Hoang in forum Qt Programming
    Replies: 3
    Last Post: 20th August 2010, 20:42
  3. Replies: 2
    Last Post: 22nd March 2010, 08:54
  4. Program in Windows, Deploy in Linux
    By suitto in forum Installation and Deployment
    Replies: 1
    Last Post: 8th April 2009, 13:11
  5. QT Program debug,GDB on Linux
    By darpan in forum General Programming
    Replies: 1
    Last Post: 26th January 2007, 22:02

Tags for this Thread

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.