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

Can't link C object library (.obj) to Fortran project

Gordon_B_
Beginner
389 Views

I am trying to link a C object library to a Fortran project in Visual Studio 2017 running under Windows 10 on a 64 bit Intel Machine.

The linking was working and I had been debugging the project but something changed when I moved the project from an external hard drive to an onboard hard drive.

The file RayOpt.obj does exist in the specified directory.  the unresolved _mcea is in the RayOpt library

I am getting the linker messages below:

1>------ Build started: Project: Traj2D, Configuration: Release Win32 ------
1>Linking...
1>1>------ Build started: Project: Traj2D, Configuration: Release Win32 ------
1>Linking...
1>ipo: error #11018: Cannot open E:\Traj2d\Subroutines\RayOpt.OBJ;
1>ipo: warning #11021: unresolved _mcea
1>        Referenced in ipo_1631243obj3.obj
1>ipo: error #11023: Not all components required for linking are present on command line
1>LINK : fatal error LNK1181: cannot open input file 'E:\Traj2d\Subroutines\RayOpt.OBJ;'
1>
1>Build log written to  "file://E:\Traj2d\Traj2D\Traj2D\Release\BuildLog.htm"
1>Traj2D - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========: Cannot open E:\Traj2d\Subroutines\RayOpt.OBJ;
1>ipo: warning #11021: unresolved _mcea
1>        Referenced in ipo_1631243obj3.obj
1>ipo: error #11023: Not all components required for linking are present on command line
1>LINK : fatal error LNK1181: cannot open input file 'E:\Traj2d\Subroutines\RayOpt.OBJ;'
1>
1>Build log written to  "file://E:\Traj2d\Traj2D\Traj2D\Release\BuildLog.htm"
1>Traj2D - 3 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I was hoping to work on this over Xmas but am stymied by not being able to link.

Would appreciate any help I can get

Thanks

Gordon

 

 

0 Kudos
2 Replies
andrew_4619
Honored Contributor II
389 Views

Posting the BuildLog.htm file might be helpful. At a glance I am also suspicious of the ";" at the end of the OBJ name is it looking for a file the has ";" at the end ?

0 Kudos
Steve_Lionel
Honored Contributor III
389 Views

Please also attach the .vfproj file for the project. Like Andrew, I am guessing that you haven't correctly specified the library dependency.

0 Kudos
Reply