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.
29280 Discussions

Linking error with Modflow build in VisualStudio 2013

jauliest
Beginner
710 Views

Hi All,

I need your help. I'm compiling Modflow2005 in visual studio with intel fortran project in debug mode, but when the link process is reached out the follow error:

Error    12     error LNK2005: _MAIN__ already defined in hydfmt.obj    mnw1to2.obj    

Error    13     error LNK2005: _IFRL already defined in mnw1to2.obj    gwf2mnw17.obj    

Error    14     error LNK2005: _NCREAD already defined in mnw1to2.obj    gwf2mnw17.obj    

Error    15     error LNK2005: _QREAD already defined in mnw1to2.obj    gwf2mnw17.obj    

Error    16     error LNK2005: _MAIN__ already defined in hydfmt.obj    mf2005.obj    

Error    17     fatal error LNK1169: one or more multiply defined symbols found    Debug\modflow.exe    

My compiler is Intel Parallel Studio XE 15.0 + Visual Studio 2013 Pro, upload the source code 446398

Tanks,

Ulises

0 Kudos
3 Replies
jauliest
Beginner
710 Views

 

 

I find the error tanks

0 Kudos
mecej4
Honored Contributor III
710 Views

You can only have one main program; you can have only one instance of a subroutine or function subprogram among all the object files being linked to build an executable. For example, there is an unnamed main program in file mnw1to2.f, as well as a named main program in file hydfmt.f.

Not knowing anything about Modflow, I cannot tell you which files you should set aside.

0 Kudos
jauliest
Beginner
710 Views

 

Tanks

 

mecej4 wrote:

You can only have one main program; you can have only one instance of a subroutine or function subprogram among all the object files being linked to build an executable. For example, there is an unnamed main program in file mnw1to2.f, as well as a named main program in file hydfmt.f.

Not knowing anything about Modflow, I cannot tell you which files you should set aside.

0 Kudos
Reply