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

Static library in studio.NET

melander
Beginner
623 Views
How does one add a static library in studio.NET?

I tried this, but LNK did not find the library

(1)Under the Tools/options/Intel Fortran Options tab I added
the full path to the library.

(2) I added the .lib file under project/add existing item

Both code and library work fine under the old Microsoft Fortran Power Station. Both code and library complies OK
with Intel fortran. The library also builds OK, but when I go to build the .exe the linker can't find the library.

There obviously should be a simple solution, but I don't see it. Thanks in advance for any help.

-M.



0 Kudos
3 Replies
Steven_L_Intel1
Employee
623 Views
(1) is not the right place - this is a list of folders that it will search for libraries, but there has to be a reference to the library somewhere

(2) should have worked. Another place you can do this is the Properties page for the project. Right click on the project name, select Properties, Linker, Input. Give the path to your library in the "Additional Dependencies" field.

Steve
0 Kudos
melander
Beginner
623 Views
Thanks for the help.

I found a solutions that works.
(1) I add the path or folder name under Tools/... libraries, and (2) I add the Library name under Project/Properties/... Addtional dependencies.

-M.
0 Kudos
Steven_L_Intel1
Employee
623 Views
I did some experiments, and indeed you're correct - adding a .lib or even a .obj to the project accomplishes nothing. I'll ask as to why this is... The solution you came up with works fine.

Steve
0 Kudos
Reply