Click here to Skip to main content
15,905,233 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I have a library(.lib) file which is designed in Visual Studio 2002(7.0) using MFC7.0. Now I need to link that library From Visual Studio 2003 (7.1) using MFC 7.1 and call functions from that library. While trying to link the library, I am getting this error: "Unable to open file : mfc70d.lib".This is understandable that the library refers the files of version 7.0. My question is: How can I link the library from VS 7.1 and call the functions. It would be a great help if anybody could tell me how can I do that?

Thanks in advance.
Updated 2-Jan-11 23:49pm
Manfred Rudolf Bihy 3-Jan-11 6:00am    
If you had the source code for that lib, the easiest way to go would be to rebuild it using the "newer" version of VS.

1 solution

It depends - I can only assume that you don't have the source code for the library. You can try, if you are really desparate, the following:

Export object files from the lib file.
disassemble trying one of the tools from Fee Disassemblers[^] that seems to fit the requirements.

alter embedded library references, and assemble and rebuid your library.

Will it work? I haven't the faintest idea ...

Another approach would be to export the functionality from your VS2002 library as a dll with a flat c - not c++ api.

Best of luck
Espen Harlinn
Share this answer
Pallab_GT 3-Jan-11 6:14am    
Hi Harlinn.
Could you tell me how do i export the functions as a dll with flat c api?
Espen Harlinn 3-Jan-11 6:31am    
Here is something:

The c/c++ version of this project,, provides a c api to functionality implemented in c++.
Good luck
Manfred Rudolf Bihy 3-Jan-11 8:07am    
Thanks for the link to the disassemblers! 5+

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