I'm trying to compile a program from source. In an OpenSuse 12.1 chroot the program compiles fines, but in an OpenSuse leap 42.1 chroot I get the following error:
g++: error: unrecognized command line option '-mt'
I've searched (both on here and on google) but couldn't find much information on the -mt flag. What is this '-mt' flag?
This flag is used to compile and link multi-threaded applications.
With gcc you should use -pthread for both compiling and linking, no -lpthread is necessary.
When compiling -pthread sets the necessary macros, when linking it links in the required libraries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With