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

How to create new static libraries and use them with projects ?

bennyf
Beginner
340 Views

Hello,

I"m trying to make a library, which contain a module with some functions.

Then I would use this library with many projects.

I do the following things:

1. I make a new library with: file -> project -> new -> library -> static library

I call this library lib1. Then I use the build manu, to build the library.

2. In the directory:

C:My DocumentsVisual Studio 2005ProjectsLib1Lib1Debug

there was the file lib1.LIB.

I copy this file to:

C:Program FilesIntelCompilerFortran10.1.011em64tLib

3. After this, I make a new project, and I try to attach thelibrary with the following:

Project->properties...->+Linker

->Additional dependencies: Lib1.lib

I press OK, and I try to build the project, but it did not recognize the library.

Where am I wrong? Please help me...

Thanks

0 Kudos
1 Reply
Steve_Nuchia
New Contributor I
340 Views

There's really not enough detail there to say why your build didn't work.

Are all the settings compatible? In particular, are both the library and the new project built in x64 Debug mode? What does "did not recognize" mean exactly?

I would suggest you use something other than the compiler's installation folder tree for you locally build libraries. In fact, by far the easiest way to make this work would be to host all your projects in a common solution and use project references to establish linkage.

0 Kudos
Reply