I'm working on a piece of code using Dev C++ and C language. I need to make it run parallel, so I just added <omp.h>
header and provided -fopenmp
flag to the compiler. the program perfectly runs when run from Dev C++ directly, but it fails to run when standalone *.exe
is executed. In that case, it reports that libgomp_64-1.dll
was not found.
here is a linked command as I can see it:
Processing C source file...
--------
- C Compiler: C:\Program Files (x86)\Dev-Cpp\MinGW64\bin\gcc.exe
- Command: gcc.exe "C:\Users\jan.kubacka\OneDrive - GA Drilling\Documents\vypocty\Tl_new_model_Lee\feasibility study\znamzat\TH-DBHE_v02.c" -o "C:\Users\jan.kubacka\OneDrive - GA Drilling\Documents\vypocty\Tl_new_model_Lee\feasibility study\znamzat\TH-DBHE_v02.exe" -fopenmp -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\include" -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include" -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include" -L"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib" -L"C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib" -static-libgcc
I did check the directory for binaries and the folder where libgomp_64-1.dll
is stored is linked correctly. I suppose when I include libgomp_64-1.dll
into the folder where *.exe
is stored it would work, but this is not what I want. I was kind of hoping that the produced *.exe
will work without any need for any auxiliary files. In addition to this, when I pass the *.exe
file to somebody who does not have the Dev C++ installed (and hence his PC has no libgomp_64-1.dll
in it), does this mean that it will simply not work? I always thought that when a .exe
file is compiled, it stores all necessary data to be executed anywhere. Am I wrong with this?
Many thanks for the clarification.
j.