Can't compile through CMake
« on: 09 November 2014, 23:37:45 »
Hello,

I am trying to compile TGUI against SFML.1 using CMake (through Visual Studio 12 2013). I receive the errors below:



I've been looking around to see if anyone else had similar problems; I couldn't find anyone else with this issue.
The directory for SFML_ROOT DOES contain include and lib. I've even been making copies of folders and moving them around to try and make it sync. The contents of "lib" and "Libs" are identical.



Thanks.


*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: Can't compile through CMake
« Reply #1 on: 09 November 2014, 23:48:08 »
That's weird.

SFML-2.1 contains the files downloaded from the sfml website (i.e. you didn't compile them yourself)?
So the lib folder contains no subfolders and has the dynamic release libraries in it directly?

Did you fill in anything manually in cmake except for SFML_ROOT? Like the include folder or the extlibs?

You might also want to check the "Advanced" checkbox and see if it finds some sfml libraries or simple none at all.

Re: Can't compile through CMake
« Reply #2 on: 09 November 2014, 23:55:55 »
Thanks for your fast reply.


Right, I didn't compile it myself.
The lib folder actually contains two sub-directories "Debug" and "Release".

I had to fill in SFML_ROOT and SFML_INCLUDE_DIR manually, I'm not sure how the external libraries popped up on CMake the first time. I didn't have to manually insert those fields. I tried replicating it, but no luck.

KHeartz

*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: Can't compile through CMake
« Reply #3 on: 09 November 2014, 23:57:39 »
Quote
The lib folder actually contains two sub-directories "Debug" and "Release".
That's wrong. Copy the contents of these folders directly into the lib folder. That will solve the problem.

Quote
I'm not sure how the external libraries popped up on CMake the first time
My cmake script detects them automatically if all goes right. But usually if it finds the external libs it also finds the sfml libs, that's why I was asking about it.

Re: Can't compile through CMake
« Reply #4 on: 10 November 2014, 00:00:06 »
As soon as you inferred that there should be no sub-directories earlier, I went back and it worked! I could have sworn that these two folders were originally in the SFML 2.1 packages. I could be wrong.

Thanks for your assistance.

*

texus

  • *****
  • 1163
    • View Profile
    • Texus's Blog
Re: Can't compile through CMake
« Reply #5 on: 10 November 2014, 00:03:56 »
These folders are not there in the official release, but I just checked and there isn't even an official release for VS2013. So I'm not sure where you got these libraries from, but the folder structure was not the same as the ones from the sfml website.

But it was the same problem as when you would compile sfml yourself. Visual Studio always creates these damn debug and release folders instead of just putting the libraries where you ask them to go.

Re: Can't compile through CMake
« Reply #6 on: 10 November 2014, 00:20:44 »
Good 'ol Visual Studio!  ;)