Hey there,
I just compiled SFML for Visual Studio 2013 and as I am just at the start of learning programming I have a few questions and I would really appreciate if you could help me.
1. I specified the additional dependencies in the Linker ( sfml-system-s.lib sfml-window-s.lib sfml-audio-s.lib sfml graphics-s.lib sfml-main.lib ) and the preprocessor definition ( SFML_STATIC ) but I couldn't compile a simple example of SFML code from the website. It seems that there were some kind of external dependency errors. I eventually got over them with :
#ifdef SFML_STATIC
#pragma comment(lib, "glew.lib")
#pragma comment(lib, "freetype.lib")
#pragma comment(lib, "jpeg.lib")
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "gdi32.lib")
#endif // SFML_STATIC
As I understand the libraries that I included depend on other libraries ( the ones above ) and I have to link them too. The above code includes them if it finds the SFML_STATIC def. Now, from what I understand this is not the proper way to do it. I want to link them as I linked the other libraries but I can't seem to find all of them. For example, in the lib folder I have the glew, freetype, jpeg but not the opengl32, winm or gdi32. Where can I find them ?
2. On the tutorial section of the website it says :
If you are using the sfml-audio module (either statically or dynamically), you must also copy the DLLs of the external libraries needed by it, which are libsndfile-1.dll and OpenAL32.dll.
Although I linked the audo lib to the project and also included <SFML/Audio.hpp> the application works without having the 2 DLL in the same folder. Why is that ? Also, can those 2 libs be linked like the static libs that I linked previously ? Do they really need to be there as dynamic libraries ? If so, why is that and why does my program run without the DLLs or without even linking them ?
Appreciate your help !