Find the answer to your Linux question:
Results 1 to 3 of 3
hi every one I need to make work two programs at the same time without using makefile. 1.Deamon.c program which have my shared memory 2. Processes.c program which creates (fork()) ...
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    23

    Execute Two Programs without makefile

    hi every one
    I need to make work two programs at the same time without using makefile.

    1.Deamon.c program which have my shared memory
    2. Processes.c program which creates (fork()) processes and those processes have to access to shared memory via PIPES.

    how can those two programs work together without using a makefile?
    Can somebody give a link to a tutorial about this staff
    Thanks

  2. #2
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I'm not entirely certain I understand. You want to compile both of these files into a single binary?

    That's easy enough:
    Code:
    gcc deamon.c processes.c
    gcc will find your main() function (you can only have one between these two files) and will use it appropriately. You will have access to all of the (non-static) functions in both files.

    Does this help?
    DISTRO=Arch
    Registered Linux User #388732

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    23
    i actually need firsly to work together, Second program is using a memory that is in the first one. i can not use include to import it coz they are all source files .c or .cpp
    Then execute both of them at the same time.

    One way of solving just come to my mind....am gona try to excev functions hope it ll work


    Thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...