2016-04-05 7 views
-1

gccでthread_createを使って簡単なCコードを構築しようとしています。 thread_create()を使用するには、どのライブラリを "#include"する必要がありますか? gccに特定のフラグも送信する必要がありますか?thread_create():メンバーCライブラリ

+5

」または[POSIX pthread_create](http://pubs.opengroup.org/)で定義されている[C11 thrd_create](http://en.cppreference.com/w/c/thread/thrd_create)を意味しますか? onlinepubs/007908775/xsh/pthread_create.html)は ''で定義されていますか? –

+0

@AlterMann私は、http://stackoverflow.com/questions/15300830/how-many-processes-and-threads-will-be-createdおよびSilberschatzらによるオペレーティングシステムの概念の書籍に記載されている機能を参照しています。 – islamfaisal

+0

特定のフラグもgccに送信する必要がありますか?はい。コンパイルには-lpthreadを使用する必要があります –

答えて

1

あなたがLinux上でなら、あなたのターミナルでman pthread_createを入力することができ、pthread_createのマンページを参照してください、詳細については、<pthread.h>に含まpthread_createを使用することができます。