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

Can't compile

仁义_许_
Beginner
3,202 Views

The legacy project builds and debugs successfully, whereas the new project fails to compile:

error LNK2019:unresolved external symbol WinMain,referenced in function "int __cdecl invoke_main(void)"

 

visual stuido edtion is 17.14.9 (July 2025) which is updated.

while input ifort --version:

ifort: remark #10448: Intel(R) Fortran Compiler Classic (ifort) is now deprecated and will be discontinued late 2024. Intel recommends that customers transition now to using the LLVM-based Intel(R) Fortran Compiler (ifx) for continued Windows* and Linux* support, new language support, new language features, and optimizations. Use '/Qdiag-disable:10448' to disable this message.
ifort: command line warning #10006: ignoring unknown option '/-version'
ifort: command line error: no files specified; for help type "ifort /help"

 

I need trasition to using the LLVM-based ifx?  Is this the reason of failure to compile the new projects?

0 Kudos
4 Replies
Arjen_Markus
Honored Contributor II
3,195 Views

It is more likely that your project does not have a proper main program. Could you check that?

0 Kudos
仁义_许_
Beginner
3,103 Views

I test only a few lines:

program main
implicit none
integer::i=6
write(*,*)i
end

0 Kudos
andrew_4619
Honored Contributor III
2,796 Views

"unresolved external symbol WinMain"  if the project options are for a windows application the entry point is "WinMain" you have a Program statement so the project type needs to be "console program".

 

andrew_4619_0-1752841713598.png

 

0 Kudos
Ron_Green
Moderator
2,007 Views
0 Kudos
Reply