User forums > Using Code::Blocks
How to get code containing pthreads to compile on Windows?
(1/1)
c_weed:
I've got some source code containing pthreads and want to build it and run it on Windows. I have mingw installed so I think I should be able to. I was getting errors when compiling through Codeblocks and I added "-pthread" under "other linker options" and it helped but I still get the error "mingw32-g++.exe: error: unrecognized option '-pthread'" and the program exits immediately. How can I fix this?
stahta01:
--- Quote from: c_weed on October 09, 2013, 11:26:27 am ---I've got some source code containing pthreads and want to build it and run it on Windows. I have mingw installed so I think I should be able to. I was getting errors when compiling through Codeblocks and I added "-pthread" under "other linker options" and it helped but I still get the error "mingw32-g++.exe: error: unrecognized option '-pthread'" and the program exits immediately. How can I fix this?
--- End quote ---
Use a compiler that supports the option "-pthread".
You will likely need to change OS to do this.
Read the FAQs and Rules. http://forums.codeblocks.org/index.php/topic,9996.0.html
Make sure you read and understand these FAQs
http://wiki.codeblocks.org/index.php?title=FAQ-General#Q:_What_Code::Blocks_is_not.3F
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Tim S.
Navigation
[0] Message Index
Go to full version