【问题标题】:How to create threads and using the sleep function in linux eclipse?如何在 linux eclipse 中创建线程并使用 sleep 功能?
【发布时间】:2012-01-14 12:18:35
【问题描述】:

我有一个 Visual Studio 项目,我正在尝试切换到在 linux 中的 eclipse 中工作。该项目是用 C 编写的。

我不知道如何正确切换我的项目,以便它在 linux 中的 eclipse 中工作。我还想知道如何创建线程以及如何使用任何睡眠类型库函数。我认为基本上我需要 windows.h 的功能。

谢谢!

【问题讨论】:

  • 使用跨平台库。对于线程,使用例如pthread,它有一个Win32版本。

标签: c eclipse multithreading visual-studio sleep


【解决方案1】:

Windows 和 Linux 有不同的 API 来处理诸如睡眠之类的事情。本文很好地概述了一些常见的移植转换,例如睡眠。 http://www.ibm.com/developerworks/systems/library/es-MigratingWin32toLinux.html

【讨论】:

  • 谢谢,我会调查一下,如果它解决了我的问题,请告诉您。
猜你喜欢
  • 2012-05-19
  • 2012-05-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-12-06
  • 1970-01-01
  • 2013-03-29
  • 2010-11-16
相关资源
最近更新 更多