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

fatal error LNK1120: 1 nicht aufgelöste Externe

Thomas14
Beginner
515 Views

With Intel one APi and Visual Studio 19 I try to compile and link the following

simple program:

program addNumbers

! This simple program adds two numbers
implicit none

! Type declarations
real :: a, b, result

! Executable statements
a = 12.0
b = 15.0
result = a + b
print *, 'The total is ', result

end program addNumbers

 

 compiling is without errors but the linker provides:

fatal error LNK1120: 1 nicht aufgelöste Externe
error LNK2019: Verweis auf nicht aufgel”stes externes Symbol "_WinMain@16" in Funktion ""int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)". MSVCRTD.lib(exe_winmain.obj)

 

What is still missing ?

 

Labels (1)
0 Kudos
3 Replies
Arjen_Markus
Honored Contributor I
502 Views

It looks as if the link step is trying to build a (32-bits?) DLL instead of a proper standalone program. Can you check the type of project?

0 Kudos
Thomas14
Beginner
474 Views

I have tried both 32 and 64 bit. Enclosed is a screenshot with the WinApp3.f90 source file.

0 Kudos
Steve_Lionel
Honored Contributor III
470 Views

You chose the wrong project type. Select Empty Project (with the Console tag) or Main Program Code as the project type.

0 Kudos
Reply