Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
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 3-Jan-11 0:44am
Pallab_GT1.5K
Edited 3-Jan-11 0:49am
v3
Comments
Manfred R. Bihy at 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
good
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
  Permalink  
Comments
Pallab_GT at 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 at 3-Jan-11 6:31am
   
Here is something: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
and: http://msdn.microsoft.com/en-us/library/a90k134d(v=vs.80).aspx
 
The c/c++ version of this project,http://site.icu-project.org/, provides a c api to functionality implemented in c++.
Good luck
Manfred R. Bihy at 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
0 CPallini 235
1 DamithSL 225
2 OriginalGriff 198
3 George Jonsson 170
4 Maciej Los 165
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 3 Jan 2011
Copyright © CodeProject, 1999-2014
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