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

Author Topic: After building the examples, at least 2 things to be done for an example  (Read 7167 times)

0 Members and 1 Guest are viewing this topic.

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Develop Environment:
    Visual Studio 2013
    Windows 7
    Debug

0. In project/property page/Debugging set Environment to ../../lib/Debug
1. copy the resource directory to the project directory if there is one

Why not to make it automatic?
Thanks.
« Last Edit: December 10, 2014, 04:26:09 pm by jronald »

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
"After Build" settings are IDE specific, and especially if you arent using an IDE, this cannot work and instead CMake would have to generate platform specific post-compile scripts to do this for you.

In short: dont be lazy.

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
When it doesn't running, I have to find the problems, this is not so efficient, if the author can refine the CMake file, it'll be much more efficient for others.

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Such is the life of the programmer. You shouldnt have to rebuild SFML a whole lot and if you are, you probably dont have a good reason to be doing it. If you are having problems getting the examples to work, you are probably doing something wrong.

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
This is not very efficient, when the example doesn't run, it depends on the error messages from the development tools to solve the problem. Fortunately, the error messages helps here. Copying the resource directory is just a must-to-do, why not copy it automatically? Setting the path to find the dll or copying the dll into the exe directory or any other methods needs decisions. Fortunately these are for examples.

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
I dont even know what you are getting at. At you complaining that you have to copy the dll for SFML modules into the same directory for each project?
« Last Edit: December 10, 2014, 08:35:15 am by Gambit »

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Yes, all the misc things, it makes inefficiency.
However it is not a big problem for examples.

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Its not a problem for anyone with a well structured development environment actually. This "problem" isnt specific to SFML, its how it works for everything, especially on windows.

However, like with *Nix, you can just chuck your dlls into system32 and you dont have this problem anymore, but dont do that.

Its also worth noting that when you link statically, you also do not have this problem, you should consider doing that if this bothers you so much.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
If you do not have multiple SFML versions on your system, you could also have a directory with the DLLs and add them to PATH.
As Gambit says this is nothing specific to SFML, whenever you use a library you need to think about where to put it.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Its not a problem for anyone with a well structured development environment actually. This "problem" isnt specific to SFML, its how it works for everything, especially on windows.

However, like with *Nix, you can just chuck your dlls into system32 and you dont have this problem anymore, but dont do that.

Its also worth noting that when you link statically, you also do not have this problem, you should consider doing that if this bothers you so much.

But when I run cmake -P cmake_install.cmake, everything needed is copied, including resource directories and all the dlls.

Gambit

  • Sr. Member
  • ****
  • Posts: 283
    • View Profile
Ok? Then whats the issue?

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
The issue is that it has been done when installing, why not when generating the solution for vs2013?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
CMake is not a build tool, it only generates make and project files. You then have to build them in a next step on your own.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

jronald

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
The resource directory is also a part of a project.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Maybe you should ask a friend to help you translate your problem better, because we've no idea what you want to achieve...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/