Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
3 Views

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

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
Highlighted
Valued Contributor II
3 Views

Posting the BuildLog.htm file

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
Highlighted
Black Belt
3 Views

Please also attach the

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

--
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos