SFML community forums

Help => General => Topic started by: Sauce. on May 20, 2013, 09:56:57 pm

Title: SFML and minGW + npp
Post by: Sauce. 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.
Title: Re: SFML and minGW + npp
Post by: Laurent 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.
Title: Re: SFML and minGW + npp
Post by: Sauce. 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.
Title: Re: SFML and minGW + npp
Post by: Laurent 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.
Title: Re: SFML and minGW + npp
Post by: Sauce. 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?
Title: Re: SFML and minGW + npp
Post by: Laurent 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.
Title: Re: SFML and minGW + npp
Post by: Sauce. on May 20, 2013, 10:24:52 pm
ALright, awesome!

Thanks for your help, I really appreciate it! ;D
Title: Re: SFML and minGW + npp
Post by: Sauce. 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
Title: Re: SFML and minGW + npp
Post by: Cornstalks 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 (https://www.google.com/search?q=intro+to+makefiles&aq=f&oq=intro+to+makefiles&aqs=chrome.0.57j62l3.1924j0&sourceid=chrome&ie=UTF-8) ;)