replacing windows functions with ubuntu linux

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Jun 2008
Posts: 158
Reputation: cam875 is an unknown quantity at this point 
Solved Threads: 3
cam875 cam875 is offline Offline
Junior Poster

replacing windows functions with ubuntu linux

 
0
  #1
Aug 21st, 2008
Ok so I am going to be switching to an ubuntu linux machine soon to do all of my coding and I was wondering if anyone has a reference to the function calls you can use with it because I am used to windows programming so now in my code

Sleep(3000);

becomes useless so I need to start finding alternatives. All help is appreciated.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: replacing windows functions with ubuntu linux

 
0
  #2
Aug 21st, 2008
sleep is in unistd.h
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: replacing windows functions with ubuntu linux

 
1
  #3
Aug 21st, 2008
Don't forget the change of units, otherwise you'll be hibernating rather than sleeping
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1464
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: replacing windows functions with ubuntu linux

 
0
  #4
Aug 21st, 2008
sleep takes parameter in seconds -- I think there is a usleep that is in milliseconds.

If you stick to standard c++ code there should not be a problem. But if you use a lot of win32 api graphics functions then you are in deep shit. Most of that is comletely different in the *nix world. My advice is to use a portable library, such as wxWidgets or QT.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 158
Reputation: cam875 is an unknown quantity at this point 
Solved Threads: 3
cam875 cam875 is offline Offline
Junior Poster

Re: replacing windows functions with ubuntu linux

 
0
  #5
Aug 21st, 2008
ok thanks for the help I do not use functions in the winapi very often so I should be fine afterall.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC