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

Problems with /fast optimization

Bill_F_
Beginner
545 Views

Hi Folks,

   I have a program that compiles with no problem using INTEL Visual Fortran (13.0) with Visual Studio 2010 (upgraded to SP1)  libraries within the Winteracter development tool. No problems are flagged. When I use the /fast compiler option, I get the following for each subroutine:

myprogram.obj : warning LNK4229: invalid directive '/Intel(R) compiler non-linkable IL object file' encountered; ignored

followed by the following killer:

LINK : error LNK2001: unresolved external symbol WinMainCRTStartup

The only difference between the two compiles is the /fast option. It appears that my program are not seeing some libraries or something. Any ideas?

Thanks in advance,

Bill Full

0 Kudos
3 Replies
Bill_F_
Beginner
545 Views

HI again... A solution is to make sure that the INTEL(XLINK) linker is being used and not the Microsoft linker. I changed this and it appears to have solved the issue...

BIll

0 Kudos
TimP
Honored Contributor III
544 Views

Yes, the Microsoft /GL and the Intel IPO object file formats are different, so you can't mix objects and tools when using these options (included in /fast).

0 Kudos
SergeyKostrov
Valued Contributor II
544 Views
>>...LINK : error LNK2001: unresolved external symbol WinMainCRTStartup You could also try to add WinMainCRTStartup symbol in the project settings for Linker: Entry Point attribute of the application. In cases when UNICODE character set is used this is mandatory to define that symbol.
0 Kudos
Reply