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

link error

jmloriot
Beginner
547 Views

Bonjour Fortran fellows,

My projects used to link and work fine. Then suddenly I get the following error.

So I go to "project properties", change the default libs, try again, most of the times it does not work, but sometimes it links fine, but only one time.

My other projects with exactly the same parameters do link fine.

Thanks in advance for your help

Jean-Marc  

 

Error      23           fatal error LNK1169: one or more multiply defined symbols found        c:\casal\execut/interface.exe 

Error      13           error LNK2005: _YIELDQQ already defined in ifconsol.lib(for_m_console.obj)  ifqwin.lib(qwkyield.obj)               

Error      6             error LNK2005: _RegisterGetUnitQQ already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgact.obj) 

Error      5             error LNK2005: _RegisterGetHandleQQ already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgact.obj) 

Error      4             error LNK2005: _ChangeQWINCP already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgmbcs.obj)            

Error      8             error LNK2005: __wgsetactive already defined in ifconsol.lib(for_m_console.obj)        ifqwin.lib(qwgact.obj)               

Error      20           error LNK2005: __wgopen already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgopen.obj)            

Error      9             error LNK2005: __wggetactive already defined in ifconsol.lib(for_m_console.obj)        ifqwin.lib(qwgact.obj)               

Error      22           error LNK2005: __scrolltextwindow already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgtext.obj)               

Error      16           error LNK2005: __QWINWrite already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgread.obj)              

Error      12           error LNK2005: __QWINTGethFrame already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwintern.obj)             

Error      18           error LNK2005: __QWINSetSize already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgsize.obj)

Error      17           error LNK2005: __QWINSetIOFOCUS already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgread.obj)              

Error      3             error LNK2005: __QWINRegisterInit already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwkentry.obj)            

Error      1             error LNK2005: __QWINRegisterEnd already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwkentry.obj)            

Error      15           error LNK2005: __QWINRead already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgread.obj)              

Error      2             error LNK2005: __QWINNiceExit already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwkentry.obj)            

Error      14           error LNK2005: __QWINMsgBox already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwkwnd.obj)              

Error      19           error LNK2005: __QWINGetSize already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgsize.obj)

Error      10           error LNK2005: __QWINGethWnd already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgact.obj) 

Error      11           error LNK2005: __QWINGetDefaultWindow already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgact.obj) 

Error      7             error LNK2005: __inchar already defined in ifconsol.lib(for_m_console.obj)    ifqwin.lib(qwgact.obj) 

Error      21           error LNK2005: __displaycursor already defined in ifconsol.lib(for_m_console.obj)                ifqwin.lib(qwgtext.obj)               

0 Kudos
4 Replies
Lorri_M_Intel
Employee
547 Views

You are linking against both the Quick-win support libraries and the console-application support libraries.

You need to choose one or the other, and that depends (of course) on what your application is doing.

Then, do a complete rebuild of your application.

I suggest a full rebuild because the library-type is encoded in the object file.   If you have an "old" object file around requesting the wrong library, then you'll be back in this same situation.

                   I hope this helps --

                               --Lorri

0 Kudos
jmloriot
Beginner
547 Views

Thanks a lot, now it makes sense for me

I have both Quick-win and Console-application projects in the same solution and they use the same  subroutines ; it is not straightforward to separate them, but I know what I have to work on.

Thanks again

Jean-Marc

0 Kudos
Lorri_M_Intel
Employee
547 Views

Well ... this sounds interesting, and frankly I hadn't thought of this configuration.

Another thing you can do is in the Quickwin project, add ifconsol.lib to the list of "ignore specific default" libraries on the property page Linker -> Input

And, in the console project, add ifqwin.lib to the list of "ignored" libraries.

Now, it won't matter how you've built the objects shared by both projects.

              --Lorri

 

0 Kudos
jmloriot
Beginner
547 Views

Thank you very much for your help.

Both the Quick-win and the Console-application were using the same intermediate directory.

Using 2 different intermediate directories did fix the problem.

0 Kudos
Reply