LNK2019 unresolved external symbol with Ultimate Toolbox COXTootlTipCtrl and ::MonitorFromRect
-
Hello, Recently, we move from VisualStudio 2010 to 2013. I use Ultimate Toolbox that I have compiled it with Visual C++ 2013 in a lib. It compiles and links without problem. When I link this lib with my program, I get a link error: LNK2019 unresolved external symbol. With Visual C++ 2010, the link process was correct. The symbol is the MonitorFromRect Windows function in COXToolTipCtrl:: CalculateInfoBoxRect(). We runs on Windows 7 Professionnal 64 bits. We compile on 32 bits Visual C++. Is there a way to bypass this problem? Thanks for any help. Claude
-
Hello, Recently, we move from VisualStudio 2010 to 2013. I use Ultimate Toolbox that I have compiled it with Visual C++ 2013 in a lib. It compiles and links without problem. When I link this lib with my program, I get a link error: LNK2019 unresolved external symbol. With Visual C++ 2010, the link process was correct. The symbol is the MonitorFromRect Windows function in COXToolTipCtrl:: CalculateInfoBoxRect(). We runs on Windows 7 Professionnal 64 bits. We compile on 32 bits Visual C++. Is there a way to bypass this problem? Thanks for any help. Claude
-
Gagnon Claude wrote:
Is there a way to bypass this problem?
Check your project settings to ensure the linker parameters are correct, and the library is included.
To elaborate on this suggestion, make sure that the linker uses the lib that you compiled with VS 2013, not the one that you compiled with VS 2010. The linker error may imply that it still sees the VS 2010 version. So, check the linker settings to see what search path it is using.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
-
To elaborate on this suggestion, make sure that the linker uses the lib that you compiled with VS 2013, not the one that you compiled with VS 2010. The linker error may imply that it still sees the VS 2010 version. So, check the linker settings to see what search path it is using.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
-
Hello, Recently, we move from VisualStudio 2010 to 2013. I use Ultimate Toolbox that I have compiled it with Visual C++ 2013 in a lib. It compiles and links without problem. When I link this lib with my program, I get a link error: LNK2019 unresolved external symbol. With Visual C++ 2010, the link process was correct. The symbol is the MonitorFromRect Windows function in COXToolTipCtrl:: CalculateInfoBoxRect(). We runs on Windows 7 Professionnal 64 bits. We compile on 32 bits Visual C++. Is there a way to bypass this problem? Thanks for any help. Claude
Hi Claude, The reason of the problem is that the code uses the definition of MultiMon.h for function MonitorFromRect instead of using the native definition of this function coming from WinUser.h. Solution : remove line "include MultiMon.h" from OXToolTipCtrl.cpp to force the usage of WinUser.h definition for this function. Florianne :)