I hope you be able to help me create my first SFML project, I been trying a long time now.
I hope you can follow my steps.
This is the built error:
unable to start program C\:SFML-2.5.0\HelloChester\Debug\HelloChester.exe
Below is the way I built the project:
Creating and configuring a SFML program
Windows 10
1. Made a folder name: C:\SFML-2.5.0
2. Made a project: and put it into the folder name: C:\SFML-2.5.0
3. Downloaded Visual C++ (2017)-32 bit and unzip into C:\SFML-2.5.0 folder
4. Project properties:
All configuration
win32
C/C++
Additional Include Directories:
SFML-2.5.0 >SFML-2.5.0-windows-vc15-32-bit>SFML-2.5.0>include
5. Project properties:
All configuration
win32
Linker
Additional library directories:
C:\SFML-2.5.0\SFML-2.5.0-windows-vc15-32-bit\SFML-2.5.0\lib
6. Project properties:
Release - win32
Linker
Input
Additional dependencies
Sfml-graphics-s.lib
Sfml-window-s.lib
Sfml-audio-s.lib
Sfml-network-s.lib
Sfml-system-s.lib
7. Project properties:
Debug - win32
Linker
Input
Additional dependencies
Sfml-graphics-s-d.lib
Sfml-window-s-d.lib
Sfml-audio-s-d.lib
Sfml-network-s-d.lib
Sfml-system-s-d.lib
8. Project properties:
Debug – win32
C/C++
Preprocessor
Preprocessor definitions:
SFML_STATIC; WIN32; DEBUG; WINDOWS;% (Preprocessor Definitions)
#include <SFML/Graphics.hpp>
int main()
{
// create the window
sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
// run the program as long as the window is open
while (window.isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
sf::Event event;
while (window.pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window.close();
}
// clear the window with black color
window.clear(sf::Color::Black);
// draw everything here...
// window.draw(...);
// end the current frame
window.display();
}
return 0;
}