---
title: "在用netbeans编写程序时-lpthread问题"
author: "maosuhan"
date: "2010-12-13T14:09:14Z"
tags: ["C", "C#", "C++", "Netbeans"]
categories: ["编程语言"]
slug: "netbeans-lpthread"
draft: false
lastmod: "2010-12-13T14:09:14Z"
id: 840753
url: "https://maosuhan.iteye.com/blog/840753"
---

编一个程序，需要用到pthread这个库，但是这个库不是c默认的库，所以要编译的时候加上－lpthread这个命令。我用的是netbeans，但是我看里面的makefile不知道写的是什么东东。于是我试图在properties'的c compiler里面添加addition options加上－lpthread但是没用。于是网上查了一下，知道应该在Linker的Libraries的里面的add options的other option加上－lpthread就可以了。