Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: pretty confused  (Read 2597 times)

0 Members and 2 Guests are viewing this topic.

dark ninjuh

  • Newbie
  • *
  • Posts: 13
    • View Profile
pretty confused
« on: October 15, 2014, 08:29:42 am »
I don't understand the point of cmake.. When you download "latest files from github" it has whats needed. why cant you just open an IDE, and set the paths to where those files are. usually the "include" and "bin" folders are full of dll's and .cpp and /hpp files and everything thats needed i just don't get it.. Cmake did work before. i "built with cmake" with no errors (not ever since i updated mingw to 4.9.1) but to use external libraries together apparently you have to cmake them all (i could do . still makes no sense) with sfml. (example, sfml with sfgui,thor,tmx loader) you would have to use cmake. i can use sfml, like the sdk. when i built with cmake before (i tried codeblocks::mingw build, then just tried mingw) i ended up with no .cpp and .hpp and not all the dll's that were needed in the resulting files . like all it did was remove some files and create a new pointless folder filled with half of what was in the original. (and there were no errors). then if i ever DID figure out how to properly build everything i wouldn't know where to begin linking multiple extentions together in one folder to work together. And i CONSTANTLY hear on this forum "these people never learn there tools" , i have post powned posting about it for like 3-4 days just simply trying to get things built properly . I seriously can make things with these tools its the "building most recent with cmake linking the corresponding version to the latest github repository to the sfml version" that gets very vague to me.

Im not asking for anything to be done for me, My goal is to have a project using sfml, (possibly thor) and the tmx loader working together. I just dont understand the result of a cmake build to get to that step. (yes with the codeblocks build i "built" the generated project file, or in the just mingw ran the g++ command) Windows is so confusing. Linux was SO MUCH EASIER.
« Last Edit: October 15, 2014, 08:31:13 am by dark ninjuh »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: pretty confused
« Reply #1 on: October 15, 2014, 09:16:33 am »
CMake doesn't work differently on Linux, OS X or Windows. CMake is simply a meta-compiler, meaning its purpose is to generate make files or project files for specific compilers on specific platforms.
Instead of having 100 different build scripts in the source and being forced to update all of them, every time there are changes, there's just one CMake file, which can generate for example Visual Studio 2010, 2012, 2013 project files on the fly or create NMake files for any of the VC++ compiler or create make files for the MinGW compiler or it can even generate Code::Blocks project files.
CMake does not build your libraries. It just generates build files you then can use with the corresponding compiler toolchain.

Since you didn't provide more information beyond "I can't get it working", I can't help you further.

If you don't get things to build, you can always consider my Nightly Builds.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

dark ninjuh

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: pretty confused
« Reply #2 on: October 15, 2014, 09:24:27 am »

If you don't get things to build, you can always consider my Nightly Builds.
i have them. its the linking to tmx loader that would be the last problem. I didnt want to throw my errors at the forum and have someone solve it for me, I can work out the current cmake errors eventually. It was the "point" of cmake that i just couldn't grasp. But pretty much cmake is supposed to make things simpler? Why cant i just configure my IDE to just link it instead of generating a project file. Now that i understand that it doesn't build the library (that clears that confusion up) . So it Would be possible to just link it. though its reccomended to cmake the project file?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: pretty confused
« Reply #3 on: October 15, 2014, 09:29:00 am »
Why cant i just configure my IDE to just link it instead of generating a project file.
It does exactly that by generating project or build files...

So it Would be possible to just link it. though its reccomended to cmake the project file?
I don't understand what you're asking here.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

dark ninjuh

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: pretty confused
« Reply #4 on: October 15, 2014, 09:34:28 am »
I don't understand what you're asking here.
Like instead of creating a new project in an IDE, blank project. project properties. link the include files the bin set SFML_STATIC and all that. cmake just, makes that for you?  Any project ive ever done, ive just did it that way. configure the project properties to make it work.  so cmake simplifies this?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: pretty confused
« Reply #5 on: October 15, 2014, 09:37:08 am »
Yes, instead of having manually configured make files and project files, CMake generates them based on some generic and some platform specific rules.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

dark ninjuh

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: pretty confused
« Reply #6 on: October 15, 2014, 09:40:49 am »
well... now i feel dumb.. it all makes sense now. Thanks for that clarification.one last thing though. what about like i said. if you have an sfml project generated. then you want to add like thor into there. and generate a different project.. then you have 2 projects configured for 2 different things? or when you have 3 things you want to use like sfml, thor, and tmx loader. that i dont get.
« Last Edit: October 15, 2014, 09:43:00 am by dark ninjuh »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: pretty confused
« Reply #7 on: October 15, 2014, 09:49:16 am »
I'm not fully sure I understand what you're asking, but if you want to use SFML, Thor and the TMX Loader, you build each of these libraries on their own. Use CMake to generate build files for SFML and build SFML. Use CMake to generate build files for Thor and build Thor. Use CMake to generate build files for the TMX Loader and build the TMX Loader. Then create your own project and add all the libraries to the project file configuration and link against all the libraries.

If you're asking how you'd go about Thor depending on SFML, then you need to read the official tutorial on Thor, it examples in details how to configure CMake to detect SFML and link against it.

Note: If you go and manually edit project files edited by CMake, you're doing it wrong! Configure everything in CMake.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/