|
-
May 5th, 2005, 03:36 AM
#1
How to make library files
Hello friends,
I have an application in which i will have to convert all the classes into lib files. I don't have any idea regd this. Can someone give me an idea how to make lib files.
thanks in advance,
varsha
-
May 5th, 2005, 06:50 AM
#2
Re: How to make library files
Hi,
I am assuming that, you are writing your program using vc++.
Open Visual C++
Select File->new->Project
Select Win32 static library under project tab.
You will be provided with a cpp file.
In that CPP file write your function which you want to create as a lib file.
Include that cpp file in your calling program, copy lib file locally or give path in the calling program's project setting-> link->object/library modules.
-
May 5th, 2005, 10:22 AM
#3
Re: How to make library files
Actually you can do this :
(1) Open the exe/dll project.
(2) Right click top node in solution explorer/file view and go new/project/Win32 project/static library.
(3) A new library project will be created and added to your workspace/solution.
(4) Go to exe/dll project, right click and dependencies...
(5) Check the box for your new library.
There you go ! You'll have to create a .h with all your exported classes in your library project and #include it into your executable but everything should be fine from that point onwards.
You can then share your library with other executables by right clicking on their solutions in solution explorer and going add/existing project. Then set the check box in their dependencies.
Darwen.
-
May 5th, 2005, 10:33 AM
#4
Re: How to make library files
 Originally Posted by varsha5in
I have an application in which i will have to convert all the classes into lib files. I don't have any idea regd this. Can someone give me an idea how to make lib files.
thanks in advance,
varsha
What kind of classes? Are they MFC based or not? Did you read that article I was talking about?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|