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

QuickWin error LNK2019 _for__exit_handler

jamesj629
Beginner
747 Views

Hello

I'm compiling a large C and F77 program in Visual Studio 2008 with Intel Fortran 11.1

The solution uses QuickWin but isn't compiling:

[plain]1>Linking...
1>ifqwin.lib(qwkwnd.obj) : error LNK2019: unresolved external symbol _for__exit_handler referenced in function __QWFrameWndProc@16
1>..\..\bin\graf.exe : fatal error LNK1120: 1 unresolved externals[/plain]

Do you know which libraries are needed for this? Or is my set up the cause?

IGNORE:

[plain]libc.lib; libcmt.lib; libcd.lib; libcmtd.lib; msvcrtd.lib; libifcoremt.lib; libmmt.lib[/plain]

DEPENDENCIES:

[plain]msvcrt.lib
MSVCPRT.LIB
libifportmd.lib
libifcoremd.lib
ifqwin.lib
ifconsol.lib

wsock32.lib
mpr.lib
comctl32.lib
netapi32.lib
shell32.lib
uuid.lib
kernel32.lib
user32.lib
advapi32.lib
gdi32.lib
comdlg32.lib
winspool.lib[/plain]

and the build step for fortran is...

[plain]ifort /MD /libs:qwin /c ...[/plain]

Any help would be appreciated. I have already searched far and wide :)

Regards

James

0 Kudos
1 Solution
Steven_L_Intel1
Employee
747 Views
Why do you have all those "ignore library" options? That is almost certainly doing you in. Don't use /MD and /libs:qwin - remove /MD. QuickWin programs link statically.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
748 Views
Why do you have all those "ignore library" options? That is almost certainly doing you in. Don't use /MD and /libs:qwin - remove /MD. QuickWin programs link statically.
0 Kudos
jamesj629
Beginner
747 Views

Thank you that has worked perfectly. I'm new to mixing fortran and c on a large solution ;)

For anyone interested my final settings for the solution were:

IGNORE: (none)

Additional: (none)

on the quickwin project .f files:

ifort /libs:qwin /c

on the other projects' .f files:

ifort /c

and code-generation on .c files was /MT (multi-threaded)

The startup project was Subsystem: Windows.

0 Kudos
Reply