Dragonfly Q&A

Compiling SFML with Visual Studio

0 like 0 dislike
I can't seem to link SFML. I have Additional Library Directories set to <br>"..\SFML-2.3\lib"<br>, and Additional Dependencies set to <br>"kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Winmm.lib;sfml-system.lib;sfml-window.lib;sfml-graphics.lib;sfml-main.lib;sfml-audio.lib;%(AdditionalDependencies)"<br>, but it prints the following message if I try to put an include to SFML/Graphics.hpp:<br>

c:\...\visual studio 2013\workspace\game engine\game engine\manager.h(7): fatal error C1083: Cannot open include file: 'SFML/Graphics.hpp': No such file or directory
asked Sep 16, 2015 in Engine Development by Andrew

1 Answer

0 like 0 dislike

The error you are describing is a compilation error, not a linking error.  The difference is that it looks like you have adjusted the library paths and libraries, but not the search paths for header files.  So, it cannot fine the Graphics.hpp header file.

You need to adjust the "include" directory path to find the SFML headers.  For how to do this in Windows Visual Studio, see step 3b of: http://dragonfly.wpi.edu/engine/setup-vs-2013.html

answered Sep 16, 2015 by claypool
More information about Dragonfly can be found on the Dragonfly Home Page.