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

LNK2005 error

rande22
Beginner
324 Views

>building in Visual Studios

Compiling with Intel(R) Visual Fortran Compiler 19.0.4.245 [IA-32]..

Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384

>get error:

        Referenced in libifcoremt.lib(for_diags_intel.obj)
        Referenced in libifcoremt.lib(for_stop.obj)
        Referenced in libifcoremt.lib(for_exit.obj)
        Referenced in libifcoremt.lib(for_nt_open_proc.obj)
        Loaded ifqwin.lib(qwkentry.obj)
ifqwin.lib(qwkentry.obj) : error LNK2005: _WinMain@16 already defined in ib507p2.obj

>_WinMain@16 not in link messages before this error.  What is happening?

>How can I fix this?

 

 

0 Kudos
1 Reply
Steve_Lionel
Honored Contributor III
324 Views

There's clearly a lot more to the error messages than you've excerpted here. But I will guess that you are trying to build an application that defines a WinMain entry point - that is, a "Windowing" application - but you've specified that it is a QuickWin application or have pulled in the QuickWin library. These two aren't compatible.

QuickWin works only for "traditional" Fortran programs with a Fortran main program. You can't mix it with a WinMain entry point.

0 Kudos
Reply