Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28859 Discussions

x64 Test program will not run on MS Windows 10Pro 64-bit

JKrob1
Beginner
853 Views

All,

 

First dabble into x64 world. Trying a simple "Hello World" but get the error pop-up upon execution:

"The application was unable to start correctly (0xc000007b)"

********************************************************

Microsoft Visual Studio Professional 2022
Version 17.11.6
VisualStudio.17.Release/17.11.6+35431.28
Microsoft .NET Framework
Version 4.8.09037

Installed Version: Professional

Intel® Fortran Compiler 2024.1
Intel® Fortran Compiler 2024.1, Copyright © 2002-2024 Intel Corporation. All rights reserved.

Edition Windows 10 Pro
Version 22H2
Installed on ‎2/‎16/‎2024
OS build 19045.5131
Experience Windows Feature Experience Pack 1000.19060.1000.0

64-bit operating system, x64-based processor

 

Thanks,

Jeff

0 Kudos
14 Replies
Steve_Lionel
Honored Contributor III
729 Views

Please zip your project, including the EXE, and attach it to a reply here.

0 Kudos
JKrob1
Beginner
709 Views

Steve,

 

Here 'ya go - hope it's not something simple/obvious

Both x86 & x64 attached. x86 works fine

 

Thanks in advance!

Jeff

0 Kudos
Mark_Lewy
Valued Contributor I
672 Views

I was going to suggest that perhaps the runtime DLLs are not in your path.  See if the program works from a "Intel oneAPI command prompt for Intel 64 for Visual Studio 2022" in "Start Menu\Programs\Intel oneAPI 2024". 

Steve_Lionel
Honored Contributor III
633 Views
D:\Projects\FormatTest\x64\Release>dir
 Volume in drive D is Data
 Volume Serial Number is 449A-EA10

 Directory of D:\Projects\FormatTest\x64\Release

11/26/2024  02:13 PM    <DIR>          .
11/26/2024  02:13 PM    <DIR>          ..
11/26/2024  02:13 PM             3,196 BuildLog.htm
11/26/2024  02:13 PM            11,264 FormatTest.exe
11/26/2024  02:13 PM               381 FormatTest.exe.intermediate.manifest
               3 File(s)         14,841 bytes
               2 Dir(s)  520,131,854,336 bytes free

D:\Projects\FormatTest\x64\Release>formattest.exe
 Hello Test...

D:\Projects\FormatTest\x64\Release>cd ..

D:\Projects\FormatTest\x64>cd debug

D:\Projects\FormatTest\x64\Debug>dir
 Volume in drive D is Data
 Volume Serial Number is 449A-EA10

 Directory of D:\Projects\FormatTest\x64\Debug

11/26/2024  02:13 PM    <DIR>          .
11/26/2024  02:13 PM    <DIR>          ..
11/26/2024  02:13 PM             3,420 BuildLog.htm
11/26/2024  02:13 PM            18,944 FormatTest.exe
11/26/2024  02:13 PM               381 FormatTest.exe.intermediate.manifest
11/26/2024  02:13 PM           495,616 FormatTest.pdb
11/26/2024  02:13 PM             1,960 Test.obj
               5 File(s)        520,321 bytes
               2 Dir(s)  520,131,854,336 bytes free

D:\Projects\FormatTest\x64\Debug>formattest.exe
 Hello Test...

Works ok for me. I'm doubtful it is a DLL path issue, as that typically results in a different message. What happens if you open a oneAPI x64 command prompt (from the Start menu), cd to the folder with the source and type:

ifx FormatTest.f90
FormatTest.exe

 

?

0 Kudos
JKrob1
Beginner
603 Views

Steve,

>What happens if you open a oneAPI x64 command prompt (from the Start menu), cd to the folder with the source and type:

ifx FormatTest.f90
FormatTest.exe

 

Jeezzz....now everything is working fine  

I noticed when I opened the oneAPI x64 command prompt, all of this was printed to the screen:

:: initializing oneAPI environment...
Initializing Visual Studio command-line environment...
Visual Studio version 17.11.6 environment configured.
"C:\Program Files\Microsoft Visual Studio\2022\Professional\"
Visual Studio command-line environment initialized for: 'x64'
: advisor -- latest
: compiler -- latest
: dal -- latest
: debugger -- latest
: dev-utilities -- latest
: dnnl -- latest
: dpcpp-ct -- latest
: dpl -- latest
: inspector -- latest
: ipp -- latest
: ippcp -- latest
: itac -- latest
: mkl -- latest
: mpi -- latest
: ocloc -- latest
: tbb -- latest
: vpl -- latest
: vtune -- latest
:: oneAPI environment initialized ::

 

Now, like I said, everything is working for that program. Did the oneAPI x64 command prompt 'login' do something to the compiler/settings that was missing before? If I compile my main x86 program to x64 & release it to my users...will it work for them or will they have problems like I had?

 

Thanks,

Jeff

0 Kudos
Steve_Lionel
Honored Contributor III
602 Views

All that does is set a bunch of environment variables for that specific command prompt session - it has zero effect on anything else. But if you build in that environment and it works, then try it outside that environment (just double-click the EXE for example - you won't see any console output but will see if you get that activation error.)

Are you saying that the program works in that environment, but still not in VS? If so, I have some other things to look at.

0 Kudos
JKrob1
Beginner
575 Views

No, the executable from the command-line & VS compilation now work in a 'regular' Command Prompt window. I tried the executable in another Windows 10-64 & Windows 11-64 (via Oracle VMs) and it works there too.

 

It would be nice to know what 'tripped' and allows the x64 executable. It's almost like the Command Prompt window was running x86 only - who knows

 

Thanks again,

Jeff

0 Kudos
JKrob1
Beginner
571 Views

Sorry, correction - the command-line compiling works, the VS compiling does *not* work. Noticed the VS executable is only 11kb where the command-line version is 565kb. So, something within VS is not kosher.

 

Going to delete the entire directory (saving the source .f90 file), reboot the computer & start from scratch...

0 Kudos
JKrob1
Beginner
566 Views

System back up - opened MSVS & went through the hoops to create a generic command-line 'Test' Hello World... program. Compiling from within VS did not work (small executable, 11kb) but 'ifx Test.f90' from the x64 command-line worked with a 565kb executable.

Is there anything special in the Project Properties that needs to be set/enabled to make this work?

 

Jeff

0 Kudos
Steve_Lionel
Honored Contributor III
435 Views

It does sound as if there's a DLL issue. When you built from the command line, it did static linking. Try it again, this time adding /libs:dll and tell us what happens when you run it from outside the Intel command prompt.

Also do this. Open a plain command prompt window (Start button, type "cmd" (no quotes), when Command Prompt app appears click that. In the window, change directory (cd) to a writeable folder, then type:

set path > path.txt

Attach path.txt to a reply here. My guess is that you have some invalid entries in PATH.

0 Kudos
JKrob1
Beginner
380 Views

Attached is the result of the path query. NOTE: initially,  the command prompt 'ifx test.f90' would complain that ifx was not found. so, taking your path idea, I saw that the "C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\bin" was not part of the PATH string so I added it. After reboot, 'ifx test.f90' now reports the banner identifying the ifx compiler...but no executable. MSVS results did not change - small executable with the error dialog as reported before. Adding /libs:dll had no effect.

 

Jeff

0 Kudos
JKrob1
Beginner
331 Views

OK - problem solved. (uggghhhh) I went to a different computer & tried the same thing (went through Project Creation Tool & simple console 'Hello World" routine). When executed there, error dialog complained about missing libifcoremdd.dll (eh?). Dug through the system, found & copied to executable directory. Then, error dialog complained about missing libmmd.dll (eh - WTH?!?!?). Found, copied that and it worked...OK.  Decided to go through the Properties->Fortran->Libraries ...then I saw it - Runtime Library was set to 'Multithread DLL (/libs:dll /thread)'. Nooo, this is NOT a DLL, so set it to just 'Multithread', recompiled, removed those dll files, and...IT WORKED!!

Went back to my other (original) system, checked out those Properties - the Runtime Library space was blank. Clicked & selected 'Multithread', recompiled and...IT WORKED!!

 

HAPPY THANKSGIVING!!

Jeff

0 Kudos
Steve_Lionel
Honored Contributor III
311 Views

The references to libifcoremdd.dll, etc., are from a debug build, and these can be run only from the VS environment. Do NOT copy those DLLs! Instead, switch to a Release configuration.

The default is to build against the DLL libraries - it's not just when you're building a DLL. 

0 Kudos
Steve_Lionel
Honored Contributor III
326 Views

Okaayyy... PATH has some dubious stuff in it. Do you know how to edit PATH?

The following:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\intel64_win\compiler;
C:\Program Files (x86)\Intel\oneAPI\compiler\latest\windows\redist\ia32_win\compiler;

should be replaced with:

C:\Program Files (x86)\Intel\oneAPI\compiler\latest\bin;

(You have the correct path for 32-bit later on.)

You once had Digital Visual Fortran installed - do you still use that? If not, remove:

C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;
C:\Program Files (x86)\Microsoft Visual Studio\Common\Msdev98\BIN;
C:\Program Files\Microsoft Visual Studio\DF98\BIN;
C:\Program Files (x86)\Microsoft Visual Studio\VC98\BIN;

The following are duplicates of earlier entries (with "Windows" rather than "WINDOWS") and can be removed:

C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\WINDOWS\System32\WindowsPowerShell\v1.0\;
C:\WINDOWS\System32\OpenSSH\;

these are also duplicates (and relate to DVF/CVF):

C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools\WinNT;
C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin;
C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;
C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin;

Delete:

C:\Program Files (x86)\Intel\oneAPI\compiler\2024.1\bin;

The following lets you run 32-bit Fortran programs, but if you want to keep it, change the 2024.0 to 2024.1:

C:\Program Files (x86)\Intel\oneAPI\compiler\2024.0\bin32;

After you make these changes, reboot and see if it helps.

0 Kudos
Reply