Click here to Skip to main content
13,045,285 members (56,364 online)
Rate this:
Please Sign up or sign in to vote.

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.
Posted 2-Jan-11 23:44pm
Updated 2-Jan-11 23:49pm
Manfred R. 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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
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 R. 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 3 Jan 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100