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
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
show the code ..
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
ASKER
Is is possible that additional compiler options are required??
stephen
stephen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.