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

Author Topic: SFML and minGW + npp  (Read 4660 times)

0 Members and 1 Guest are viewing this topic.

Sauce.

  • Newbie
  • *
  • Posts: 6
    • View Profile
SFML and minGW + npp
« on: May 20, 2013, 09:56:57 pm »
How can i use sfml with notepad plus plus and Mingw?
I have looked all over and i can not find out a solution  :-[
I am fairly new to programming I have made several small programs, and i have worked with sfml in Microsoft's Visual C++ 2010 Express without problems, but i am going for a more minimalistic approach and i would really like to use SFML for my game project.

Thanks in advance!

Sauce.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML and minGW + npp
« Reply #1 on: May 20, 2013, 10:00:34 pm »
What's your problem? Is it really "using SFML with Notepad++ and MinGW", or rather "using Notepad++ and MinGW for anything"? ;)

You should read tutorials about makefiles. The SFML community can help, but we can't teach you how to write makefiles.
Laurent Gomila - SFML developer

Sauce.

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SFML and minGW + npp
« Reply #2 on: May 20, 2013, 10:05:08 pm »
Like i said i have made several programs before and most of them were with Notepad++ and MinGW.
It's just specifically SFML, i haven't done anything with non standard library's without an IDE before tho.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML and minGW + npp
« Reply #3 on: May 20, 2013, 10:09:52 pm »
Ok, so it's very simple:
- add include path with -Iyour/path/to/sfml/include
- add library path with -Lyour/path/to/sfml/lib
- link the SFML libraries with -lsfml-graphics -lsfml-window -lsfml-system (same for sfml-audio and sfml-network if you use them).
- if you link SFML statically, define SFML_STATIC with -DSFML_STATIC

This will basically be the same for any other library.
Laurent Gomila - SFML developer

Sauce.

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SFML and minGW + npp
« Reply #4 on: May 20, 2013, 10:16:55 pm »
Just to be clear, I type all of that into the command promt?
I.E: g++ myprogram.cpp -o myexecutable.exe -Iyour/path/to/sfml/include -Lyour/path/to/sfml/lib -lsfml-graphics -lsfml-window -lsfml-system

or am I way off?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: SFML and minGW + npp
« Reply #5 on: May 20, 2013, 10:22:22 pm »
Yes. But things will start to be more and more complicated, so you should really learn how to write makefiles.
Laurent Gomila - SFML developer

Sauce.

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SFML and minGW + npp
« Reply #6 on: May 20, 2013, 10:24:52 pm »
ALright, awesome!

Thanks for your help, I really appreciate it! ;D

Sauce.

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SFML and minGW + npp
« Reply #7 on: May 22, 2013, 03:32:59 am »
I havnt been able to find any good tutorials on makefiles, is there any you would recommend??
thanks

Cornstalks

  • Full Member
  • ***
  • Posts: 180
    • View Profile
    • My Website
Re: SFML and minGW + npp
« Reply #8 on: May 22, 2013, 04:48:28 am »
I havnt been able to find any good tutorials on makefiles, is there any you would recommend??
All the links here ;)

 

anything