質問

I am new to threading (multicore programming). I was told that programming with parallel process threads can only be done on linux systems, and not windows? Is that true?

I have a Windows 7 system. My homework is the use pthreads to do matrix multiplication in C++. Is there any way for me to do it on my Windows 7?

Also, my teacher asked my to use gedit. How do I run codes in Gedit? I do not see a compile button, and do not know what I can do in place of the compilation command in linux?

Thanks.

役に立ちましたか?

解決

gedit is just a text editor , maybe your teacher use it in order to write code.

For implementing pthread you can use a IDE such like codeblocks , it's free.

open a new project , and in build option -> lincker setting add : pthread , finally include in your project "pthread.h" then you can create , destroy .threads as you want

他のヒント

If you want to do it in Windows 7, Install a virtual machine and any ubuntu (Linux variant). Use the virtual machine to access ubuntu from windows7 itself. And then install gcc and gedit tools on your ubuntu. Write a code on gedit, save it and then from the command prompt run the following command to compile it:

gcc code.c -o code

code will be your executable.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top