I was told by a friend that I could pass -j 4 to the make which would let me take advantage of my new (new to me) dual core processor. I have tried to pass -j 3 to my make but it then complains about not seeing sh.exe:
make.exe: Do not specify -j or --jobs if sh.exe is not available.
make.exe: Resetting make for single job mode.
I am on Windows XP Pro SP2 using version 4.9.9.2 of Dev-cpp.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
GCC is originally developed on Linux. sh is a Linux command shell and supports the ability to start multiple processes simultaneously. Make uses the command shell to launch build commands, so using the -j switch allows it to compile multiple modules simultaneously. It is only any real advantage if you have a significant number of modules. If your builds take less than a minute already, I would not bother.
MinGW GCC uses the windows cmd shell. It is possible to launch independent processes with this, but make presumably does not support it, or cannot for some technical reason.
It will have no affect on the generated code, which is why it is seldom that important except for large projects with multiple developers changing many files simultaneously, and using continuous integration techniques (or if you are building the Linux kernel, or the GNU toolchain for example). It may take longer to get it to work than the time you will save!
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was told by a friend that I could pass -j 4 to the make which would let me take advantage of my new (new to me) dual core processor. I have tried to pass -j 3 to my make but it then complains about not seeing sh.exe:
make.exe: Do not specify -j or --jobs if sh.exe is not available.
make.exe: Resetting make for single job mode.
I am on Windows XP Pro SP2 using version 4.9.9.2 of Dev-cpp.
GCC is originally developed on Linux. sh is a Linux command shell and supports the ability to start multiple processes simultaneously. Make uses the command shell to launch build commands, so using the -j switch allows it to compile multiple modules simultaneously. It is only any real advantage if you have a significant number of modules. If your builds take less than a minute already, I would not bother.
MinGW GCC uses the windows cmd shell. It is possible to launch independent processes with this, but make presumably does not support it, or cannot for some technical reason.
You might try installing a Windows build of sh.exe from http://gnuwin32.sourceforge.net/ or http://unxutils.sourceforge.net/
Of course, rather than relying on a friend, you should read teh manual: http://www.gnu.org/software/make/manual/make.html#Parallel to get the full skinny.
It will have no affect on the generated code, which is why it is seldom that important except for large projects with multiple developers changing many files simultaneously, and using continuous integration techniques (or if you are building the Linux kernel, or the GNU toolchain for example). It may take longer to get it to work than the time you will save!
Clifford