Git Product home page Git Product logo

Comments (2)

DrBarbare avatar DrBarbare commented on May 30, 2024

Hi there,

Do you know how CMake was invoked? You mention having to specify SFML libraries path by hand... What is the first error message you encountered? Also, it looks like you are working from Visual Studio, do you have a more precise version?

Sorry for this long delay!

from sfgui.

DrBarbare avatar DrBarbare commented on May 30, 2024

Here is the steps I took to build on my Windows box today (full disclosure, I am a linux user at heart, so the following is command line interaction)

  1. Configure the project using CMake;
    cmake -H".\" -B"Build" -DSFML_DIR="D:\Libraries\SFML32\SFML-2.5.0\lib\cmake\SFML\"
    

    I provide CMake with the path to a file called SFMLConfig.cmake, which allows find_package to know where the libraries are.

  2. Build using MSBUILD
    cmake --build Build -j 6
    

    -j 6 tells MSBUILD to use 6 threads. You can also do -- /m to pass the "native" option of multicore build.

  3. Wait... Compilation takes much longer than on a unix-box ;)

It completes after a while with:

    23 Warning(s)
    0 Error(s)

Finally, I have:

SFGUI> ls .\Build\lib\Debug\

    Directory: SFGUI\Build\lib\Debug

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        1/19/2019   1:34 PM        3656704 sfgui-d.dll
-a----        1/19/2019   1:34 PM         215320 sfgui-d.exp
-a----        1/19/2019   1:34 PM       21160384 sfgui-d.ilk
-a----        1/19/2019   1:34 PM         352610 sfgui-d.lib
-a----        1/19/2019   1:34 PM       14929920 sfgui-d.pdb

When CMake starts configuring, you can see what it picked as compilation tools, in this case:

-- Building for: Visual Studio 15 2017
-- Selecting Windows SDK version 10.0.17134.0 to target Windows 10.0.16299.
-- The CXX compiler identification is MSVC 19.15.26730.0

To run examples, I found it easier to use static libraries for both SFML and SFGUI (I am not sure of Windows rules regarding shared libraries...).

-DSFGUI_BUILD_SHARED_LIBS=OFF
-DSFML_STATIC_LIBRARIES=ON

from sfgui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.