Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29284 Discussions

Intel Fortran Compiler and MS Visual Studio dummy question

royxu
Beginner
1,523 Views
Hello,
I just bought Intel Visual Fortran Compiler version 9 for Windows and MS Visual Studio 2005. I installed all of them. Now I open my old Fortran 90 project in MS Visual Studio and want to run it again. I followed what it is said in the documents and tried to build this project by clicking
Build->Build myproj, but the output showed "0 succeed, 0 failed, 1 up-to-date, o skipped." There is no .exe file generated. I cann't go to Debug->Start Debugging since it cann't find .exe file.

My project works fine in the old Compaq compiler. I remember my project need to call NAG library. I cann't find the place in the new compiler to define the library, maybe that is the reason for the building problem. However no error message has been found.

Does anybody has similiar experience before? Any advice will be appreciated.

Thanks!

Roy
0 Kudos
7 Replies
Steven_L_Intel1
Employee
1,523 Views
There is a two-step process when opening CVF projects in Intel Visual Fortran. First you open the project and let Visual Studio convert it to the newer Visual Studio format. Then right click on the project and select "Extract Compaq Visual Fortran Project Items". This converts the project to the Intel Visual Fortran format.

Now you can build For more information, please see Migrating Compaq Visual Fortran Applications to Intel Visual Fortran
0 Kudos
royxu
Beginner
1,523 Views
Thanks for your input. Now I can build my Fortran project but a lot of error messages came out. I realized I need to call my NAG library file "nagfl.lib". I went to Tools->Options->Intel Fortran->Library, and found the directory which has file nagfl.lib listed there. So the compiler should be able to find the NAG library file.
Why did I still get the error message as followings?

1>------ Build started: Project: simu1031, Configuration: Debug Win32 ------
1>Compiling with Intel Fortran 9.1 C:Program FilesIntelCompilerFortran9.1IA32...
1>..Simulation_October05libmet.f
1>..Simulation_October05simulation10-6-05.f90
1>Linking...
1>dfor.lib(for_diags.obj) : error LNK2005: _for_emit_diagnostic already defined in libifcoremt.lib(for_diags_intel.obj)
1>dfor.lib(for_diags.obj) : error LNK2005: _for__issue_diagnostic already defined in libifcoremt.lib(for_diags_intel.obj)
1>dfor.lib(for_diags.obj) : error LNK2005: _for__io_return already defined in libifcoremt.lib(for_diags_intel.obj)
1>libc.lib(sqrt.obj) : error LNK2005: _sqrt already defined in libmmt.lib(sqrt_stub.omu)
1>libc.lib(87ctran.obj) : error LNK2005: _exp already defined in libmmt.lib(exp_stub.omu)
1>libc.lib(log.obj) : error LNK2005: _log already defined in libmmt.lib(log_stub.omu)
1>libc.lib(output.obj) : error LNK2005: ___lookuptable already defined in LIBCMTD.lib(output.obj)
1>libc.lib(output.obj) : error LNK2005: ___wnullstring already defined in LIBCMTD.lib(output.obj)
1>libc.lib(output.obj) : error LNK2005: ___nullstring already defined in LIBCMTD.lib(output.obj)
1>libc.lib(fpexcept.obj) : error LNK2005: __set_errno already defined in LIBCMTD.lib(dosmap.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __cinit already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: _exit already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __exit already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __cexit already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __C_Exit_Done already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __C_Termination_Done already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __exitflag already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __wpgmptr already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __pgmptr already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: ___winitenv already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __wenviron already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: ___initenv already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __environ already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: ___wargv already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: ___argv already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: ___argc already defined in LIBCMTD.lib(crt0dat.obj)
1& gt;libc.lib(crt0dat.obj) : error LNK2005: __winminor already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __winmajor already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __winver already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __osver already defined in LIBCMTD.lib(crt0dat.obj)
1>libc.lib(crt0dat.obj) : error LNK2005: __umaskval already defined in LIBCMTD.lib(crt0dat.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINGethWnd already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINTGethFrame already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINGetFocus already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: _ChangeQWINCP already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINGetFileName already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __wgopen already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINClose already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __wgsetactive already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __wggetactive already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: _RegisterGetHandleQQ already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: _RegisterGetUnitQQ already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINWrite already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINSetIOFOCUS already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINRead already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINSetSize already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINGetSize already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINMsgBox already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINRegisterEnd already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __inchar already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINSetFocus already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __clearscreen already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __displaycursor already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __scrolltextwindow already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINNiceExit already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK200 5: __QWINRegisterInit already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __QWINGetDefaultWindow already defined in dfconsol.lib(for_m_console.obj)
1>ifconsol.lib(for_m_console.obj) : error LNK2005: __qw32used already defined in dfconsol.lib(for_m_console.obj)
1>LINK : warning LNK4098: defaultlib 'libc.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Debug/simu1031.exe : fatal error LNK1169: one or more multiply defined symbols found
1>
1>Build log written to "file://c:Documents and SettingsAll UsersDocumentsSample Sizesimu1031DebugBuildLog.htm"
1>simu1031 build failed.
1>
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

0 Kudos
Steven_L_Intel1
Employee
1,523 Views
You are linking against a version of NAG that was built for use with Compaq Visual Fortran. You must get from NAG a new library built for use with Intel Visual Fortran.

You should also go to Tools..Options..Intel Fortran..General. Click on the "..." button next to Libraries and remove from the list any folders with DF98 in their path. Repeat this for Executables and Includes. This will make sure that CVF files are not used when building Intel Fortran applications (they will cause errors.)
0 Kudos
royxu
Beginner
1,523 Views
Thanks! I have NAG source fortran codes. Can I use MS Visual Studio to make my own Intel Visual Fortran compatible NAG library file (nagfl.lib)? How can I bulid one *.lib file from thousands Fortran source files?

Thanks!



0 Kudos
Ali_L_
Beginner
1,523 Views

I really don't understand how to fix this problem, I am getting these messages:

Error    1     error LNK2005: _REDIST already defined in redist.obj    redistsubm.obj    

Error    2     error LNK2005: _VELS already defined in vels.obj    vels_fpso.obj    
Error    3     error LNK2005: _ORIENT already defined in orient.obj    TESTorient.obj    
Error    4     fatal error LNK1169: one or more multiply defined symbols found    Debug\FSRVM_A.exe    

0 Kudos
Steven_L_Intel1
Employee
1,523 Views

Ali,

You have added to your project source files that contain the same routines as other source files. Looking at the messages you showed, it suggests that you have a redist.f90 and a rediststubm.f90 (the files may be .f or .for) both defining a routine named REDIST. Similar for the other duplicates. Figure out which versions you want and remove the others.

0 Kudos
Ali_L_
Beginner
1,523 Views

Oh yeah, that make sense! THANK YOU

0 Kudos
Reply