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

unresolved _MAIN__ with /iface:stdcall

Deleted_U_Intel
Employee
477 Views
Compiling and linking a trivial program

program dummy
end

by

ifort dummy.f /iface:stdcall

fails with

Intel Fortran Compiler for 32-bit applications, Version 8.0 Build 20031017Z Package ID: w_fc_p_8.0.035
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.
Microsoft Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

-out:dummy.exe
-subsystem:console
-entry:mainCRTStartup
dummy.obj
libifcore.lib(libifcoremain.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main
dummy.exe : fatal error LNK1120: 1 unresolved externals


Huh? Without /iface:stdcall all is fine.

Actually, what I am trying to do is to make a DLL with ifort 8.0
to replace an existing DLL what was built by CFV6.6 and is called from main built also by CVF6.6
0 Kudos
1 Reply
Steven_L_Intel1
Employee
477 Views
Amusing. Please submit this to Intel support. This shouldn't prevent you from building a DLL, though. You don't want /iface:stdcall - use /iface:cvf instead. There's some significant differences.
0 Kudos
Reply