Posts

Showing posts with the label sfml

SFML, Google Test and Visual Studio

SFML, Google Test and Visual Studio I'm new on this site, so be gentle with me. I've made a project using visual studio 2017 and SFML. I need to add a google test project and I don't know how to set up correctly both SFML and gtest. When I try it using some tutorial online I get the error LINK2019, but this problem occurs only when I create a test.cpp that uses SFML elements that come from my main project. Also, my project needs to be an exe and cannot be converted to lib (I've also tried that option). If someone can help or link to a good tutorial for this I really appreciated. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Statically linking Visual Studio dlls to dynamically linked sfml project

Statically linking Visual Studio dlls to dynamically linked sfml project I have an SFML, Visual Studio project that needs to be linked using the /MT option in the runtime library settings because I want to avoid having to install the microsoft redistributable to every computer that runs the program. When I added sfml to the project, it appeared to work fine in its dynamic form. However, when I tried the program on another computer, it told me that I had missing visual studio dlls. I understand that in order to link sfml statically to the project I would have to rebuild it with different runtime libraries. My question is why would it be able to correctly compile with sfml dynamically linked to the project and have the project set to /MT at the same time if it failed to statically link the necessary visual studio dlls to the project? My problem is that dynamically linking sfml and statically linking the runtime libraries results in the program requiring the re...