|
-
September 13th, 2010, 05:51 AM
#4
Re: Libraries and compiler compatibility
Hi Again,
I have an application built on VS2005 which uses a static library built using VS6.0.
I have noticed an issue of incorrect function getting called from a static library linked at compiled time. Note that this static library was built using Visual Studio 6.0. Whereas my application which is using the static library for linking at compile time is built using VS2005.
At run time, I see that incorrect/different functions are getting called rather than the ones which are supposed to get called.
To solve this issue:
I rebuilt the static library (.lib) using VS2005. Then this newly built static library was used for compilation along with my application on VS2005. Then the functions are getting called correctly.
I have 2 questions here:
1) This means that if there is any static library built with older version of VS6.0, then it will not work correctly with an application built with VS2005. We need to rebuild it with the same compiler as the application is built with. Is this true? why this happens in case of static libraries?
2) If above point-1 is true, then isn't it necessary to rebuild DDLs also with VS2005? If no, then why it is ok that a DLL built with older version of compiler works fine with application built with newer compiler version?
There are 10 types of people in this world, those who understand binary and those who do not!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|