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

How to link from a main project to a static library project

hendersonstr
Beginner
597 Views
I created two IVF projects ina vs2003 solution:
  1. a static library project and
  2. a console project that call a subroutinecontained inthat static library.

I tried everything from specifying project dependencies to additional dependencies, etc, but can't get this work. Somebody please take a quick look. Thanks.

0 Kudos
3 Replies
Steven_L_Intel1
Employee
597 Views
You're being misled by unfortunate wording in the error message. The problem is not linking, it's that the compiler can't see the .mod file created by the static library project. Unfortunately, making a project depend on another does not automatically add the subproject's INCLUDE path. So you must do that manually. In the main project, specify the subproject's Debug (or Release) folder under Additional Include Directories.
0 Kudos
hendersonstr
Beginner
597 Views

Steve, thanks. Problem solved. Are these tricks documented somewhere?

0 Kudos
Steven_L_Intel1
Employee
597 Views
Hmm. No, it would appear. I'll see what we can do about that. At a minimum, I'll write some FAQ articles for our support site.
0 Kudos
Reply