How to link a lib file in visual studio 2010


















Specify a name for the project—for example, MathLibrary —in the Name box. Specify a name for the solution—for example, StaticMath —in the Solution Name box. Choose the OK button. Under Additional Options , uncheck the Precompiled header check box if it's checked. In the center pane, select Win32 Console Application. In the Application Settings page, under Application type , select Static library. Under Additional options , uncheck the Precompiled header checkbox. Choose Finish to create the project.

In the center pane, select Header File. Specify a name for the header file—for example, MathLibrary. A nearly blank header file is displayed. Add a declaration for a class named Arithmetic to do common mathematical operations such as addition, subtraction, multiplication, and division. The code should resemble:. Specify a name for the source file—for example, MathLibrary.

A blank source file is displayed. Use this source file to implement the functionality for class Arithmetic. The build creates a static library, MathLibrary. When you build on the Visual Studio command line, you must build the program in two steps.

The cl command invokes the compiler, Cl. Second, run lib MathLibrary. When you click in the field, you get a Click on this button and add one library name per line. Alternatively you can write the names in the field. Separate all entries with space characters. I did this in Visual Studio But I think it works in previous versions, as well. That's it! Just one step! Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Yep, works in VS , if the lib is in a standard path, it is picked up automatically! Without knowing your compiler, no one can give you specific, step by step instructions, but the basic procedure is as follows: Specify the path which should be searched in order to find the actual library usually under Library Search Paths, Library Directories, etc.

Mash the build button. Gemini14 Gemini14 6, 4 4 gold badges 26 26 silver badges 31 31 bronze badges. This description is very vague. What did you try, and how did it fail. Jonathan Wood Jonathan Wood Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. Learn more. Linking a. Asked 5 years, 10 months ago. Active 5 years, 10 months ago. Viewed 7k times. Nickal Nickal 1 1 gold badge 9 9 silver badges 23 23 bronze badges. Add a comment. Active Oldest Votes. Jianfeng Zhu Jianfeng Zhu 58 5 5 bronze badges. Sorry, I forgot to mention that I have done what you have mentioned. Anything else is required to do? Do I need a.



0コメント

  • 1000 / 1000