I am compiling with GCC 4.8.2 (MinGW) on Windows. I am using openMP in my program. When I compile without -static flag I get this output from dumpbin /dependents myapp.exe:
Dump of file myapp.exe
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
KERNEL32.dll
msvcrt.dll
USER32.dll
libgomp-1.dll
Now including libgomp-1.dll in the same folder as myapp.exe won't be enough as that depends on some more .dlls (libwinpthread-1.dll and libgcc_s_seh-1.dll) and dumpbin only goes one level deep.
Now I compile including -static in compilation flags and I get this output from dumpbin:
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
KERNEL32.dll
msvcrt.dll
USER32.dll
Is it now going to work without .dlls on which libgomp-1.dll depends? Did GCC include static version of those libraries as well? Would dumpbin be able to detect those new dependencies ?
(I am probably getting a bit paranoid here but those things are very difficult to test on local machine where I have those dlls in many places on my PATH)