Yeah I realized that one too. Hmm I really can't get it to work. I just got a bunch of dll errors.
So heres what I done.
I exactly followed the tutorial on the web. So here is the steps to reproduce:
1. I go download the latest SFML version here https://github.com/SFML/SFML.
2. I downloaded the latest Thor version here https://github.com/Bromeon/Thor.
3. I build SFML with CMake. It builds fine.
4. I build Thor using CMake:
I exactly followed the picture on the Thor website. I didn't tick any checkbox as indicated specially on THOR_SHARED_LIBS. Building docs and examples causes massive headaches for me. I don't need them for now. I just wanted to build this library!
When I clicked configure, it looks for FreeType, Glew, JPEG, OpenAL, SNDFile libraries. I know where to find them. Its on extlibs/msvc/x64 folder in SFML source directory.
5. I added SFML/extlibs/msvc/x64 into the SFML root since it looks for those libraries.
6. I replaced CMAKE_INSTAL_PREFIX with the one I preferred.
7. I redirected SFML_INCLUDE_DIR to the include directory of the master file.
I configured it successfully and generated the project files needed to compile Thor using MSVS 2012 as the generator. I am using Visual Studio 2013.
So I ran the project. I didn't get any errors yey! But when I look at the lib folder. There is no dll on it. Only Object File Library. I don't know if this is the actual result. I am new to VS, though I am expecting .dlls similar to my recently rebuilt SFML.
I also setup my Visual studio to accomodate Thor.
Project Properties > C/C++ > Additional Include Directories > I added
SFML-master\include and Thor-master\include.
On Linker settings > Additional Library Directories > I added the SFML and Thor's lib folder. This is for both Release and Debug.
I compiled a very simple project. It says it cannot find Aurora. So I knew from here there is something wrong. I believe Aurora came along with SFML. Anyway, I downloaded Aurora from the website as well. Added the Aurora path to include path.
I compiled it again, it no longer looks for Aurora. But it gives me an error.
Error 3 error LNK1120: 2 unresolved externals Thor1.exe 1 1 Sample Thor1
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ) referenced in function _main
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall C:\Users\Neon Warge\Documents\Visual Studio 2013\Projects\Sample Thor1\main.obj Sample Thor1
So I went to checkout if I missed something. I am frustrated and started experimenting. I checked back THOR_SHARED_LIBS and it seems to work ok. I compiled it and I never encountered those error again. But I have a new errors. Division error, a change in SFML or Thor causes this and this can be fixed by downloading the master version right? I have already post a thread regarding that one and told me to compile SFML and Thor master file using CMake.
I just realized up to now I still encountered the error. I need the latest SFML and Thor to be working together. I have a deadline to meet and this eats a lot of my time.
Please let me know if I missed something. I will gladly appreciate any help.
Thank you so much guys. Sorry for the long post.
If you don't tick THOR_BUILD_SHARED you'll be creating static libraries. DLLs are dynamic libraries and not static ones.
Personally I advise people to either build everything static or everything dynamic, unless they really know what they're doing.
If you want to go the static way, you need to build SFML static as well and you won't end up with DLLs. You also need to define SFML_STATIC and THOR_STATIC. Additionally you need to link all of SFML's dependencies.
If all doesn't work, you could use my Nightly Builds.
Hi,
Make sense. So by your explanation, what I really wanted is shared_library. That's what I did now, I get this error:
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) float __cdecl sf::operator/(class sf::Time,class sf::Time)" (__imp_??Ksf@@YAMVTime@0@0@Z) referenced in function "float __cdecl thor::getElapsedRatio(class thor::Particle const &)" (?getElapsedRatio@thor@@YAMABVParticle@1@@Z) C:\libraries\Thor\build\branches\Thor-master-build\src\Particle.obj thor
I already build a fresh copy of SFML master and Thor master. Anything I've missed so far? It cannot link to division operator from sf::Time. I've checked the file and it has definition for two sf::Time division. I wonder what I did wrong.
Give me links to your nightly builds.