I generate a executable without any problem. But when I use it, the following error appears:
The ordinal 747 could not be located in the dynamic link library. ...
I uses Visual Studio 2015 and Intel(R) Visual Fortran Composer XE 2013.
The same .vfproj is used by other colleagues without such error.
Thank you for your help`.
This is Windows' obscure way of telling you that you have a DLL in the search path that is older than the one whose library was linked against. It has nothing to do with project settings (or the compiler.)
What is the complete message? Does it name a particular DLL? How are you running the program - from inside Visual Studio or some other way? Is this on the same system where you built the application?
Sounds just like the earlier forum post here.
In setting up your system you appear to have created a version mismatch between the EXE and DLLs as noted in the cited earlier post. In your case, I don't whether it would involve the same or a different OpenMP related DLL. Perhaps you obtained/install a run-time environment from a release prior to the Visual Fortran Composer XE 2013 that you note having and used to build the executable on your system.
Using Dependency Walker on yours and a colleague's system for the executable might shed more clues about what is different between the systems and leading to the issue.
Answering to Steve, the complete message is:
The ordinal 747 could not be located in the dynamic link library D:\......\File.exe
Indicating the path of the .exe file.
I generate the .exe inside Visual Studio. And I run the .exe from Command Prompt.
Everything in the same computer.
There are no problems in the input data. The input files work perfectly when I use the .exe file generated from the same code but in other computers.
Are you SURE you have that message right? It should not be naming an EXE. Please don't edit the message - attach a screenshot.
Go to http://dependencywalker.com and download Dependency Walker for your executable type (32-bit or 64-bit). It's a ZIP file you unpack into a convenient folder. From the environment in which you're running the executable, run depends.exe (in the unpacked folder) and tell it to "open" your EXE. It may give various warnings, some of which can be ignored. Go to the File menu and select Save As... Save the report as a .dwi file. Create a zip of the .dwi file and attach it here.
You also did not answer my questions about whether you are running the program on the same computer where you built it.
This is very odd - an EXE is not a DLL and it sounds as if the EXE is looking for an entry point in itself as a DLL. The DWI doesn't show that your EXE is linked to any DLLs, so I am very confused as to why Windows would be trying to look for an ordinal (routine index) in the EXE.
How do you run this program - do you just run the EXE? What happens if you move it to a folder that doesn't have such a long path and run it from there?
This is the procedure that I follow:
Following your indications, I moved the folder to have a shorter path but the problem remains. I think that the problem is in the .exe because when I use the .exe generated by one of my colleagues in their computers the executable works well.
I also tried to work with Visual Studio 2013 and I had the same problem.
The version of Fortran is: Intel(R) Visual Fortran Composer XE2013 for Windows. In particular, I installed Intel Visual Fortran using the I attached the parallel_studio_xe_2017_update1_setup.exe which I downloaded from https://software.intel.com/en-us/qualify-for-free-software/student.
First, you should not be copying libiomp5md.dll into your executable folder. I wonder if this is the cause of the problem. Instead, if this is a system that does not have Intel Fortran installed, install the Intel compiler redistributables.
The problem was that the libiomp5md.dll that I was using was not the correct one for my compiler version. I copy this dll from the folder IntelSWTools\compilers_and_libraries and it solved the problem.
You should not have needed to copy it at all if you were running on a system with the compiler or correct redistributables installed. Copying DLLs into the executable folder can lead to multiple problems.