问题
I'm working on a DLL project in Visual Studio 2017. This library adds some functionality around the ftd2xx library from FTDI. I set up the project as described in this instruction. I'm linking against the static version of the ft2dxx library. The only difference between the instruction and my project is the selection of the Runtime Library. The instruction states (figure 2.16) that the Multi-threaded Debug Runtime library must be used. In my case, I selected the Multi-threaded Debug DLL (/MDd) option, because i'm working on an DLL (see the image below) When i build the project, I get the following errors: When i clicked on the first warning, this page opens. I changed the project properties as described on the webpage: This fixes the first warning, but the link errors still exists:
So, to conclude: I assume there is something wrong with the Runtime Library, used by the ftd2xx library, but I have no idea how to fix this. Any suggestions?
回答1:
I found the solution here. The solution is to add the 'legacy_stdio_definitions.lib' to the linker input. To do this, go to the project properties -> Linker -> Input and add 'legacy_stdio_definitions.lib' to the additional dependencies.
来源:https://stackoverflow.com/questions/46423975/ftd2xx-static-library-link-error