Link to home
Start Free TrialLog in
Avatar of zollen
zollen

asked on

compiling a C++ on linux with gcc-3.2.2

I use the following commands to compile my program

g++ -I./ testme.cpp Thread.o -lpthread -lm -lieee

Basically, the main program creates 5 threads and each thread supposes to print out a "hello world" statement. However the main program cannot create all 5 threads for some unknown reason......

Any idea?
stephen
Avatar of akshayxx
akshayxx
Flag of United States of America image

show the code ..
Avatar of zollen
zollen

ASKER


pthread_create (thr, NULL, StartRoutine,....);

StartRoutine() is a function invoked in a child thread. The only thing it does is to print out "hello world". I created 5 threads but I see only 2-4 "hello world" statements on my screen....

stephen
Avatar of zollen

ASKER

Is is possible that additional compiler options are required??

stephen
ASKER CERTIFIED SOLUTION
Avatar of akshayxx
akshayxx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial