Hello! I have this Makefile(VScode + mingw(msys2 on default settings))
I have 1 tab as space
all:run
CC=g++
CFLAGS=-O1 -Wall -std=c++17 -Wno-missing-braces -I./include/ -L ./lib/ -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
TARGET=main.exe
SRC=src/main.cpp
$(TARGET): $(SRC) Makefile
$(CC) $< -o $@ $(CFLAGS)
build: $(TARGET)
run: build
./$(TARGET)
but I get this error make: *** [Makefile:10: run] Error -1073741511
D:.
my file tree
- .gitignore
- main.exe
- Makefile
- README.md
- sfml-audio-2.dll
- sfml-audio-d-2.dll
- sfml-graphics-2.dll
- sfml-graphics-d-2.dll
- sfml-network-2.dll
- sfml-network-d-2.dll
- sfml-system-2.dll
- sfml-system-d-2.dll
- sfml-window-2.dll
- sfml-window-d-2.dll
- tree.txt
-
+¦¦¦.github
- L¦¦¦workflows
- jekyll-gh-pages.yml
- static.yml
-
+¦¦¦include
- - desktop.ini
- -
- L¦¦¦SFML
- - Audio.hpp
- - Config.hpp
- - desktop.ini
- - GpuPreference.hpp
- - Graphics.hpp
- - Main.hpp
- - Network.hpp
- - OpenGL.hpp
- - System.hpp
- - Window.hpp
- -
- +¦¦¦Audio
- - AlResource.hpp
- - desktop.ini
- - Export.hpp
- - InputSoundFile.hpp
- - Listener.hpp
- - Music.hpp
- - OutputSoundFile.hpp
- - Sound.hpp
- - SoundBuffer.hpp
- - SoundBufferRecorder.hpp
- - SoundFileFactory.hpp
- - SoundFileFactory.inl
- - SoundFileReader.hpp
- - SoundFileWriter.hpp
- - SoundRecorder.hpp
- - SoundSource.hpp
- - SoundStream.hpp
- -
- +¦¦¦Graphics
- - BlendMode.hpp
- - CircleShape.hpp
- - Color.hpp
- - ConvexShape.hpp
- - desktop.ini
- - Drawable.hpp
- - Export.hpp
- - Font.hpp
- - Glsl.hpp
- - Glsl.inl
- - Glyph.hpp
- - Image.hpp
- - PrimitiveType.hpp
- - Rect.hpp
- - Rect.inl
- - RectangleShape.hpp
- - RenderStates.hpp
- - RenderTarget.hpp
- - RenderTexture.hpp
- - RenderWindow.hpp
- - Shader.hpp
- - Shape.hpp
- - Sprite.hpp
- - Text.hpp
- - Texture.hpp
- - Transform.hpp
- - Transformable.hpp
- - Vertex.hpp
- - VertexArray.hpp
- - VertexBuffer.hpp
- - View.hpp
- -
- +¦¦¦Network
- - desktop.ini
- - Export.hpp
- - Ftp.hpp
- - Http.hpp
- - IpAddress.hpp
- - Packet.hpp
- - Socket.hpp
- - SocketHandle.hpp
- - SocketSelector.hpp
- - TcpListener.hpp
- - TcpSocket.hpp
- - UdpSocket.hpp
- -
- +¦¦¦System
- - Clock.hpp
- - desktop.ini
- - Err.hpp
- - Export.hpp
- - FileInputStream.hpp
- - InputStream.hpp
- - Lock.hpp
- - MemoryInputStream.hpp
- - Mutex.hpp
- - NativeActivity.hpp
- - NonCopyable.hpp
- - Sleep.hpp
- - String.hpp
- - String.inl
- - Thread.hpp
- - Thread.inl
- - ThreadLocal.hpp
- - ThreadLocalPtr.hpp
- - ThreadLocalPtr.inl
- - Time.hpp
- - Utf.hpp
- - Utf.inl
- - Vector2.hpp
- - Vector2.inl
- - Vector3.hpp
- - Vector3.inl
- -
- L¦¦¦Window
- Clipboard.hpp
- Context.hpp
- ContextSettings.hpp
- Cursor.hpp
- desktop.ini
- Event.hpp
- Export.hpp
- GlResource.hpp
- Joystick.hpp
- Keyboard.hpp
- Mouse.hpp
- Sensor.hpp
- Touch.hpp
- VideoMode.hpp
- Window.hpp
- WindowHandle.hpp
- WindowStyle.hpp
-
+¦¦¦lib
- - libFLAC.a
- - libfreetype.a
- - libogg.a
- - libopenal32.a
- - libsfml-audio-d.a
- - libsfml-audio-s-d.a
- - libsfml-audio-s.a
- - libsfml-audio.a
- - libsfml-graphics-d.a
- - libsfml-graphics-s-d.a
- - libsfml-graphics-s.a
- - libsfml-graphics.a
- - libsfml-main-d.a
- - libsfml-main.a
- - libsfml-network-d.a
- - libsfml-network-s-d.a
- - libsfml-network-s.a
- - libsfml-network.a
- - libsfml-system-d.a
- - libsfml-system-s-d.a
- - libsfml-system-s.a
- - libsfml-system.a
- - libsfml-window-d.a
- - libsfml-window-s-d.a
- - libsfml-window-s.a
- - libsfml-window.a
- - libvorbis.a
- - libvorbisenc.a
- - libvorbisfile.a
- -
- L¦¦¦cmake
- L¦¦¦SFML
- SFMLConfig.cmake
- SFMLConfigDependencies.cmake
- SFMLConfigVersion.cmake
- SFMLSharedTargets-debug.cmake
- SFMLSharedTargets-release.cmake
- SFMLSharedTargets.cmake
- SFMLStaticTargets-debug.cmake
- SFMLStaticTargets-release.cmake
- SFMLStaticTargets.cmake
-
L¦¦¦src
main.cpp
main.cpp
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}