How do I create my own library in C++?
How to create a library in C++
Collapse
X
-
Tags: None
-
In the case of Windows where you might be using Visual Studio.NET, you create a WIN32 project and whenthe wizard appears, select Application Settings. In that dialog, check static library. Then click Finish.
Your project build result will be a .lib file.Comment
-
I'm sorry, I haven't a clue what you're talking about. All I want is to create a library in C++ V5.02. If you know how can you explain it step by step?Originally posted by weaknessforcatsIn the case of Windows where you might be using Visual Studio.NET, you create a WIN32 project and whenthe wizard appears, select Application Settings. In that dialog, check static library. Then click Finish.
Your project build result will be a .lib file.
And I am using windows.Comment
-
Do you mean Visual C++ v5.02 ? (Or may be Borland C++ v5.02). There are no google hits on Microsoft C++ V5.02.
In the case of Visual C++ it is as weaknessforcats stated, when you create a project you need to look for the "static library" project type, then you will create a project that produces a library (.lib)
If you are using the command line then there is a switch to the linker that instructs it to create a library (.lib) rather than an executable, for your version I believe you should be using either the command lines
link32 -lib <arguments>
or
lib32 <arguments>
Since Visual Studio 2005 this has become
lib <arguments>Comment
Comment