Solved

compiling c++ program using threads in linux

Posted on 2002-05-23
2
176 Views
Last Modified: 2010-04-02
i have written a typical c++ program using pthreads. i would like to know the compilation process for the same in steps and in detail
0
Comment
Question by:kalpanas
  • 2
2 Comments
 
LVL 3

Expert Comment

by:MDarling
ID: 7029320
write makefile
type make

or

g++ -o programname filelist...

Just read the man pages for g++ and make

0
 
LVL 3

Accepted Solution

by:
MDarling earned 50 total points
ID: 7029324
might want to link in libpthread as well...

g++ -o programname filelist -lpthread
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

912 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now