add window example
This commit is contained in:
parent
763befdbbc
commit
8ee47a3c1a
6
Makefile
Normal file → Executable file
6
Makefile
Normal file → Executable file
@ -5,9 +5,9 @@ CC := $(PREFIX)-gcc
|
|||||||
CXX := $(PREFIX)-g++
|
CXX := $(PREFIX)-g++
|
||||||
LD := $(PREFIX)-ld
|
LD := $(PREFIX)-ld
|
||||||
CPPFLAGS := -I$(SFML_DIR)/include
|
CPPFLAGS := -I$(SFML_DIR)/include
|
||||||
LDFLAGS := -L$(SFML_DIR)/lib -lsfml-system -static-libstdc++ -static-libgcc
|
LDFLAGS := -L$(SFML_DIR)/lib -lsfml-system -lsfml-window -static-libstdc++ -static-libgcc
|
||||||
|
|
||||||
all: clock
|
all: clock window
|
||||||
|
|
||||||
clock: clock.cpp
|
%: %.cpp
|
||||||
$(CXX) -o $@ $(CPPFLAGS) $^ $(LDFLAGS)
|
$(CXX) -o $@ $(CPPFLAGS) $^ $(LDFLAGS)
|
||||||
|
14
window.cpp
Normal file
14
window.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
#include <SFML/Window.hpp>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
App.Display();
|
||||||
|
}
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user