Note that there are some explanatory texts on larger screens.

plurals
  1. POLNK 2005 linker issues with msvcrt.lib(MSVCR90.dll)
    primarykey
    data
    text
    <p>I am sharing a static lib with a client. it is using vs2008 sp 1. </p> <p>i am using a third party lib which i built with the mfc with shared dll and /MD option release version</p> <p>I then built my own static lib which includes this third party lib with MFC with shared dll option and /MD release version.</p> <p>i created a test dll to just make sure it work. no issues runs fine. I am not using MFC at all. only the client is that is why they told me to use MFC with shared dll and /MD.</p> <p>now they are complaining that they are getting</p> <p>xyz already defined in msvcrt.lib(MSVCR90.dll) errors. these look like LNK2005 errors i think.</p> <p>they are stating the following:</p> <p>"Specifically linking is failing due to the fact that "my library" is statically linking with many libraries common with the larger manufacturing tool chain build. These common library functions are being exported by the "my library" causing the linking conflicts.</p> <p>furthermore they state:</p> <p>"In order to resolve this problem the "my library" can only expose the functions associated with the single API (from my static lib) itself in order to guarantee no linking conflicts result. Exported functions can be manipulated when the "my library" is built using a combination of linker options and module definition (.def file) statements"</p> <p>I am not sure what could cause this issue. this is not a problem on my end but there. I am thinking maybe they are having issues using incorrect options or the wrong CRT version?</p> <p>also, I am not sure i can comply with their request of maybe not linking with msvcrt.lib(MSVCR90.dll) as my static lib does rely on standard c functions etc. </p> <p>i am pretty lost at the moment, i did research a couple of links <a href="https://stackoverflow.com/questions/8097733/how-to-distribute-c-run-time-crt-libraries">How to distribute C run-time (CRT) Libraries</a></p> <p>and </p> <p><a href="http://www.nuonsoft.com/blog/2008/10/29/binding-to-the-most-recent-visual-studio-libraries/" rel="nofollow noreferrer">http://www.nuonsoft.com/blog/2008/10/29/binding-to-the-most-recent-visual-studio-libraries/</a></p> <p>but if what is stated in the link the issue with the CRT then i am not sure how to figure out what CRT i am using my static lib in vs2008. i have used /verbose to see it but it does not work. and i know dumpbin or dependency walker will not cut it for a static lib.</p> <p>Been struggling with this for a few days and have researched like crazy. no answers as to why they could be having issues with msvcrt.lib(MSVCR90.dll). </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload