Click here to Skip to main content
15,897,101 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I ma Developing .lib Project On ms-mos System using borland c++, So I have to use other .lib in my project so Is'it Possible to use .lib in other .lib project..?
If Possible then Please Tell me Solution How can we do it..?

What I have tried:

I ma Developing .lib Project On ms-mos System using borland c++, So I have to use other .lib in my project so Is'it Possible to use .lib in other .lib project..?
If Possible then Please Tell me Solution How can we do it..?
Posted
Updated 24-Jan-19 22:51pm
Comments
Richard MacCutchan 25-Jan-19 4:59am    
You can include it if is is a static lib, but it is generally not necessary. You do not really need to refer to the other lib except when creating the final executable.
LaXmIkAnT_YaDaV 25-Jan-19 7:51am    
Read -> https://stackoverflow.com/questions/2157629/linking-static-libraries-to-other-static-libraries

1 solution

Use must add the lib to the linker settings in that project. Dont ferget to add the path of the libs to the lib path.

And you need to include the headers in the project to have the prototypes of the used functions.

I personally like #pragma comment but dont know if Borland is supporting it.
 
Share this answer
 
Comments
Member 14095469 25-Jan-19 5:47am    
but I am Creating One .lib project in this project I want to add other .lib.
If it is .EXE then we can do it as per your answer.
k5054 25-Jan-19 9:38am    
You've added a dependency to your lib. That's not unusual. If you're using any of the standard C functions like printf() or fopen(), then you have a dependency on the standard library. What this means is that when you want to use the lib, you'll need to remember to link in the third party lib, and deploy the third party lib with the any executables. If you're providing the lib to customers, then you'll need to document the dependency. That documentation should probably include information on how to contact the provider of the third party lib to get a legal copy of it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900