SFML community forums
Help => General => Topic started 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.
-
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.
-
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.
-
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.
-
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?
-
Yes. But things will start to be more and more complicated, so you should really learn how to write makefiles.
-
ALright, awesome!
Thanks for your help, I really appreciate it! ;D
-
I havnt been able to find any good tutorials on makefiles, is there any you would recommend??
thanks
-
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) ;)