none
visual studio 2008 with intel fortran compiler. error LNK2019: unresolved external symbol _MAIN__ referenced in function _main libifcoremt.lib

    Question

  • Hello, i am writing a file in FORTRAN, and i am getting the following error when i try to build the project:

     

    error LNK2019: unresolved external symbol _MAIN__ referenced in function _main libifcoremt.lib

     

    my code is very long so i will not post it here. However, it does not contain the word MAIN anywhere in it.

     

    here is my build log. Please help.

     

    Build Log

    Build started: Project: usermat, Configuration: Debug|Win32

    Environment Space
    =C:=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
    ALLUSERSPROFILE=C:\ProgramData
    ANSYS130_DIR=C:\Program Files\ANSYS Inc\v130\ANSYS
    ANSYSLIC_DIR=C:\Program Files\ANSYS Inc\Shared Files\Licensing
    ANSYS_SYSDIR=Intel
    ANSYS_SYSDIR32=Intel
    APPDATA=C:\Users\user\AppData\Roaming
    AWP_LOCALE130=en-us
    AWP_ROOT130=C:\Program Files\ANSYS Inc\v130
    CADOE_DOCDIR130=C:\Program Files\ANSYS Inc\v130\CommonFiles\help\en-us\solviewer
    CADOE_LIBDIR130=C:\Program Files\ANSYS Inc\v130\CommonFiles\Language\en-us
    CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=TIMMY
    ComSpec=C:\Windows\system32\cmd.exe
    FOR__IS_DEBUGGER_PRESENT=1
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Users\user
    ICEMCFD_SYSDIR=win
    IFORT_COMPILER11=C:\Program Files\Intel\Compiler\11.1\048\
    INCLUDE=C:\Program Files\Intel\Compiler\11.1\048\include;C:\Program Files\Intel\Compiler\11.1\048\include\ia32;C:\Program Files\Intel\Compiler\11.1\048\mkl\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include
    INTEL_LICENSE_FILE=C:\Program Files\Common Files\Intel\Licenses
    KMP_DUPLICATE_LIB_OK=TRUE
    LIB=C:\Program Files\Intel\Compiler\11.1\048\lib\ia32;C:\Program Files\Intel\Compiler\11.1\048\mkl\ia32\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 9.0\VC\PlatformSDK\lib\x86;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib
    LOCALAPPDATA=C:\Users\user\AppData\Local
    LOGONSERVER=\\TIMMY
    LSTC_LICENSE=ANSYS
    MATLAB_SYMBOLIC=matlab
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\Program Files\Intel\Compiler\11.1\048\bin\ia32;C:\Program Files\Common Files\Intel\Shared Files\Ia32\Bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files\Intel\Compiler\11.1\048\lib\ia32;C:\Program Files\Intel\Compiler\11.1\048\mkl\ia32\bin;C:\watcom-1.3\binnt;C:\watcom-1.3\binw;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2010a\runtime\win32;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\Windows Live\Shared;C:\Program Files\proeWildfire 5.0\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 17 Model 3 Stepping 1, AuthenticAMD
    PROCESSOR_LEVEL=17
    PROCESSOR_REVISION=0301
    ProgramData=C:\ProgramData
    ProgramFiles=C:\Program Files
    PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\
    PUBLIC=C:\Users\Public
    P_SCHEMA=C:\Program Files\ANSYS Inc\v130\AISOL\CADIntegration\Parasolid\PSchema
    QTJAVA=C:\Program Files\Java\jre6\lib\ext\QTJava.zip
    SystemDrive=C:
    SystemRoot=C:\Windows
    TEMP=C:\Users\user\AppData\Local\Temp
    TMP=C:\Users\user\AppData\Local\Temp
    USERDOMAIN=TIMMY
    USERNAME=user
    USERPROFILE=C:\Users\user
    VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\
    VisualStudioDir=C:\Users\user\Documents\Visual Studio 2008
    VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
    WATCOM=C:\watcom-1.3
    WecVersionForRosebud.1FB4=2
    windir=C:\Windows
    __iflSearch=C:\Program Files\Intel\Compiler\11.1\048\bin\ia32;C:\Program Files\Common Files\Intel\Shared Files\Ia32\Bin;C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files\Intel\Compiler\11.1\048\lib\ia32;C:\Program Files\Intel\Compiler\11.1\048\mkl\ia32\bin;C:\watcom-1.3\binnt;C:\watcom-1.3\binw;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files\PC Connectivity Solution\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MATLAB\R2010a\runtime\win32;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\Windows Live\Shared;C:\Program Files\proeWildfire 5.0\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
    
    
    
    Output
       
    Linking...
    Link /OUT:"Debug\usermat.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\Users\user\Documents\Visual Studio 2008\Projects\usermat\usermat\Debug\usermat.exe.intermediate.manifest" /DEBUG /PDB:"C:\Users\user\Documents\Visual Studio 2008\Projects\usermat\usermat\Debug\usermat.pdb" /SUBSYSTEM:CONSOLE /IMPLIB:"C:\Users\user\Documents\Visual Studio 2008\Projects\usermat\usermat\Debug\usermat.lib" "Debug\usermat.obj"
    Link: executing 'link'
    libifcoremt.lib(for_main.obj) : error LNK2019: unresolved external symbol _MAIN__ referenced in function _main
    Debug\usermat.exe : fatal error LNK1120: 1 unresolved externals
    
    
    usermat - 2 error(s), 0 warning(s)
    


    Thank you
    Monday, June 20, 2011 6:54 PM

All replies