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
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

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

    [code][/code] tags please

    "this key-id 0x00313233
    and this is my source :

    QSharedMemory shm("123");"


    123 doesnt look very much like 0x00313233. What do you think about that?


    "...using nativekey()."
    Where are you using nativekey()? I don't see it anywhere...
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  2. #2
    Join Date
    Apr 2012
    Posts
    5
    Platforms
    Unix/X11

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

    thank you for your interest
    first, I use Qsharedmemory shm("123") because of casting "123" to hex is equal to 0x00313233
    second, for the nativekey ,i just asked how can I use it in my application to assign the shared memory segment created by c program

    thank you.
    Last edited by marwan; 9th May 2012 at 22:58.

  3. #3
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

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

    you must have qt 4.8 or later. you should NOT pass a key into ctor.

    I'm not sure if your casting of hex to string is right or not.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

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.