you can see these posix linux threads examples that can be compiled with c++ like this $ g++ -lpthread pthread1.c
Next step was to create a simple example with qt creator
something like get_pid.c example from advanced linux programming book
so after an empty gui project is created do small modification like this and run it
it should give you no errors and it should print in the console the pid
Starting /home/mariuz/work/qtgetpid/qtgetpid/qtgetpid...
/proc/self reports process id 7977
getpid() reports process id 7977
No comments:
Post a Comment