Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everybody, I am running Ubuntu and compiling with gcc. I need to use sleep() function, and iostream.h, but it says the package is missing: thread.c:4:19: error: iostream: No such ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    11

    Missing iostream.h package

    Hi everybody, I am running Ubuntu and compiling with gcc.
    I need to use sleep() function, and iostream.h, but it says the package is missing:

    thread.c:4:19: error: iostream: No such file or directory
    thread.c: In function ‘myfunz’:
    thread.c:11: warning: implicit declaration of function ‘sleep’
    thread.c:12: warning: no return statement in function returning non-void

    I have been looking through the various web-sites, but I found no one saying how to download the package in order to put it into /usr/include.
    Any suggestions? Thank you in advance!!

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    If your compiling a C++ program then use g++ not gcc.

    To use sleep you have to include the unistd.h header and you probably want iostream not iostream.h.

    Also, you should post your code so I can verify my suggestions..
    Make mine Arch Linux

  3. #3
    Just Joined!
    Join Date
    Jun 2010
    Posts
    11
    Yes you are right!! Thank you!!

Posting Permissions

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