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

error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

Brian_A_
Novice
3,199 Views
When compiling without any type of graphics like -libs:qwin turned on our program runs fine. As soon as we turn on the option -libs:qwin we get this error:
LIBCMT.lib(wincrt0.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
[bash]ifort -nologo $(FFLAGS) $(FPSTOP) $(FL) -libs:qwin \
	relap\relap5.o lib\relap$(NM).lib \
	lib\scdap$(NM).lib lib\contmn$(NM).lib lib\matpro$(NM).lib \
	lib\envrl$(NM).lib lib\graphics.lib \
	graphics\opengl32.lib graphics\glu32.lib graphics\f90gl.lib \
	graphics\f90glu.lib graphics\f90glut.lib graphics\glut32.lib \
	-exe:bin\relap5.exe[/bash]
THis is the command our make file is using.
I am also getting this error:
relap5.o : error LNK2019: unresolved external symbol __QWINSetExit referenced in function _MAIN__
0 Kudos
1 Solution
Steven_L_Intel1
Employee
3,199 Views
As I mentioned in the other note, you disabled default libraries so the QuickWin support library was not linked in. You have to compile all the Fortran sources with -libs:qwin, not just put it on the link.

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
3,200 Views
As I mentioned in the other note, you disabled default libraries so the QuickWin support library was not linked in. You have to compile all the Fortran sources with -libs:qwin, not just put it on the link.
0 Kudos
Reply