- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are attempting to migrate a rather large Fortran/C (mostly Fortran) program from VS 2003/IVF 8 to VS 2005/IVF 10.1. The program compiles and links just fine under the oldcombination, but fails to link when using the new combination. The problem lies in the fact that the main project cannot "see" the .lib files generated by the supporting projects in the solution. In order to get thesolution to link, Ihave to add the individual .lib files to the main project.
Is there some setting that I'm missing in either VS 2005 or IVF 10.1 that makes the libraries fromall of the projects in a solution available to the main project???
Thanks for any assistance,
cje
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mixed-Language Applications in Visual Studio 2005
In Microsoft Visual Studio 2005 with a C/C++ main program and a Fortran static library dependent project, Visual Studio no longer looks for the output file (typically a .lib) of non-C/C++ dependent projects. The alternative is to add the dependent project's .lib as a "source file" or to give its full path on the Linker property page as an "Additional Dependency". This issue is resolved in Visual Studio 2005 Service Pack 1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the quick response, Steve. I just got everything installed on a new computer, so the Service Pack has not been pushed to me yet. I'll call our IT folks and get 'er done.
Guess it boils down to RTFM. Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Just got Service Pack 1 installed and the issue is better, but still remains to some extent.
For my Solution, I am provided with several static libraries (no source code provided) and it seems that whenever one of these libraries calls a routine that is contained in a separate project (source code included in Solution), that I need to call in the .lib file for the separate project (i.e. precompiled static libraries cannotlink toproject libraries that are compiled as part of my solution).
Note that this solution compiles and links under VS 2003/IVF 8 without the need to add in the extra library links to the main project.
Any further ideas?
cje
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So let's say you have libraries A, B and C. A has calls to routines in B, B has calls to routines in C and C has calls to routines in A. When the linker gets to C, it is done with A and B and if an unresolved reference would be satisfied by A, well, too bad.
It would be instructive to look at the link command as shown in the project build log, and perhaps compare that to what you see in VS2003. For the structure of your application, you may need to force one or more libraries to the end of the list, or even specify them twice (under "Additional Dependencies" in the Linker > Input property page.)
The compiler has no control over the order of libraries.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page