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

Author Topic: Installation with MinGW64  (Read 4488 times)

0 Members and 1 Guest are viewing this topic.

Menthro

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Installation with MinGW64
« on: January 28, 2017, 09:11:13 am »
Okay guys and girls, I would really appreciate some help here. This is the first time I have ever needed to install a library for use. I am running MinGW64 but NOT code::blocks. Can anyone give me a helping hand on how to do this properly?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Installation with MinGW64
« Reply #1 on: January 28, 2017, 09:43:02 am »
Quote
I am running MinGW64 but NOT code::blocks
It's helpful to know what you don't use, but it would be even more helpful to know what you use. Command line? Makefile? Another IDE?

Quote
Can anyone give me a helping hand on how to do this properly?
You should rather explain what's blocking you, because nobody's going to write a complete tutorial for you here ;)
Laurent Gomila - SFML developer

Menthro

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Installation with MinGW64
« Reply #2 on: January 28, 2017, 08:03:31 pm »
Quote
I am running MinGW64 but NOT code::blocks
It's helpful to know what you don't use, but it would be even more helpful to know what you use. Command line? Makefile? Another IDE?

Quote
Can anyone give me a helping hand on how to do this properly?
You should rather explain what's blocking you, because nobody's going to write a complete tutorial for you here ;)

I am using Sublime 3 to build and command line to run. What is blocking me is I just am not sure at all how to use the library, can I just throw it somewhere in C: and include it in the program somehow?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Installation with MinGW64
« Reply #3 on: January 28, 2017, 11:07:47 pm »
I'd suggest you use the (IMO) easiest approach:
  • Download SFML's source (either zipped or by cloning the repository).
  • Download and install CMake.
  • Create the proper makefiles to build SFML, but also set the installation folder to your MinGW folder.
  • Build and install SFML.
This way all SFML files will land in the right folders for the MinGW components to find them just like it happens on Linux.

Let's assume MinGW is installed in "C:\MinGW", so I'd run the following commands:

cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:/MinGW C:/SFML/source
cmake --build . --config Debug --target install
cmake --build . --config Release --target install

Running these three lines will build and install both debug and release builds of SFML.

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Installation with MinGW64
« Reply #4 on: January 29, 2017, 04:35:08 am »
I'd suggest you use the (IMO) easiest approach:
  • Download SFML's source (either zipped or by cloning the repository).
  • Download and install CMake.
  • Create the proper makefiles to build SFML, but also set the installation folder to your MinGW folder.
  • Build and install SFML.
This way all SFML files will land in the right folders for the MinGW components to find them just like it happens on Linux.

Let's assume MinGW is installed in "C:\MinGW", so I'd run the following commands:

cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=C:/MinGW C:/SFML/source
cmake --build . --config Debug --target install
cmake --build . --config Release --target install

Running these three lines will build and install both debug and release builds of SFML.

why not just download the prebuilt GCC 6.1.0 MinGW (SEH) - 64-bit from here
http://www.sfml-dev.org/download/sfml/2.4.1/

I think that is far and away the easier approach

in your example
where do you run the cmake command from
C:\MinGW ?
the cmake installation folder ?
the sfml download folder ?

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Installation with MinGW64
« Reply #5 on: January 29, 2017, 11:26:02 am »
From the folder including the SFML sources. You can just download precompiled SFML, if it works for you, but there's always the chance people pick the wrong one. :)

If you're grabbing the precompiled one, just extract it to your MinGW installation folder, i.e. SFML's "lib" should overlap with MinGW's "lib". Same for "include".

 

anything