Click here to Skip to main content
Click here to Skip to main content
Alternative Tip

Tagged as

How to build an image (DLL/EXE) when two of its included libraries have the same symbol (say function/variable) using VC++

, 24 Jan 2012
Rate this:
Please Sign up or sign in to vote.
As stated by many, the inclusion of /FORCE:MULTIPLE switch may lead to unexpected scenarios (even though the code will compile and link) and as an alternative we can build a DLL wrapper [as hinted by dvpsun] over any of the static lib and can invoke the repeated function via this wrapper...
As stated by many, the inclusion of /FORCE:MULTIPLE switch may lead to unexpected scenarios (even though the code will compile and link) and as an alternative we can build a DLL wrapper [as hinted by dvpsun] over any of the static lib and can invoke the repeated function via this wrapper DLL.
 
Remember to load the DLL using LoadLibrary(...) and not by including it as additional lib. Then we can use GetProcAddress(...) to get the pointer to the function in this wrapper and invoke it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Lakamraju Raghuram
Software Developer
India India
_____________________________________________________________
 
Did my masters from IIT-M in Advanced Manufacturing Technology and working mainly on C++ in CAD domain from 2004 onwards.

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 24 Jan 2012
Article Copyright 2012 by Lakamraju Raghuram
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid