lar_jens
asked on
A static library's library??
Suppose I have a static library (which I actually happen to have). And I don't want to change that library, because I like it the way it is. This library is used by a console application, and works fine.
What I want to do now, is to make another static library, which contains the code in the application mentioned above, except that I will alter it to not print anything to standard out, but instead return information to the caller. The static library need to be linked with another static library. Is this possible??
Can I make a static library that needs functions from a static library? If so, how do I do it?
I am using VC++6.0 Enterprise Edition.
What I want to do now, is to make another static library, which contains the code in the application mentioned above, except that I will alter it to not print anything to standard out, but instead return information to the caller. The static library need to be linked with another static library. Is this possible??
Can I make a static library that needs functions from a static library? If so, how do I do it?
I am using VC++6.0 Enterprise Edition.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
When you create _your_ static library, just make sure this other static library is linked to it. i.e. include this other library in the project's workspace. Then make sure that your library does not export anything that is exported from the other library. i.e the headers you write for your library should not mention any procedures or data types exported from the other library, only the ones exported from you library. I think that in that case, you will not nead to link programs that use your library with the other library. try it.
ASKER
Thank you..
I didn't realize it was that simple, but it really is.. =)
I made two static libraries, and linked my new app with both, and I made myself a new header file that just told my app what the functions was named.. And of course, I had no naming conflicts.
Cool..!
I didn't realize it was that simple, but it really is.. =)
I made two static libraries, and linked my new app with both, and I made myself a new header file that just told my app what the functions was named.. And of course, I had no naming conflicts.
Cool..!