Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where do I execute "LIB"

Status
Not open for further replies.

newtovisualc

Programmer
Apr 21, 2006
2
US
I am trying to link a fast fourier transform library (fftw) to my codes. I downloaded the required .dll and .def files from fftw.org. According to the instructions, I have to execute the following lib command:

lib /machine:i386 /def:libfftw3-3.def

The MSDN help file says: "To run LIB, type the command lib followed by the options..."

Question: where do I do this (in the VC++ environment)? The command window that I can access from the main VC++ window does not recognize it...
 
Thanks for your quick reply to my post.

I am using Microsoft Visual C++.NET -- Microsoft Development Environment 2003, Version 7.1.3088 -- Microsoft.NET framework 1.1. (That's all the information listed in the "about" window).

Thanks again!!!
 
I'm not sure what a .def file is, and I've definitely never heard of anyone running a lib command, but those look like linker options, so I'd go to Project->Properties, then click the Linker folder and click on Command Line. There you can add:
"/machine:i386 /def:libfftw3-3.def"
to the Additional Options and see if that gets it to link properly.
 
lib.exe creates a *.lib file, provided a *.def (entry list) and *.dll

I would suggest you search for lib.exe under the Studio folder, nothing more, nothing less.

------------------
When you do it, do it right.
 
If you are running from the command line, go to the disk where studio is installed and type
Code:
dir /s lib.exe
The lib command creates a jump table which both the executable and DLL use to link to each other. The def file is for backward compatibility. Lots of places still use them, especially when sending out DLLs for hot fixes. You have to ensure that the offsets are the same otherwise the executable will pull up the wrong function from the DLL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top