-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Default version sfml is 3.0.0 now.
brew list --versions sfml
sfml 3.0.0
➜ cloth_simulation git:(main) ✗ make
g++ -std=c++17 -I/opt/homebrew/Cellar/sfml/3.0.0/include -c main.cpp -o main.o
In file included from main.cpp:7:
./input_handler.h:16:19: error: no member named 'type' in 'sf::Event'
if (event.type == sf::Event::MouseButtonPressed && event.mouseButton.button == sf::Mouse::Left) {
~~~~~ ^
./input_handler.h:16:57: error: expected '(' for function-style cast or type construction
if (event.type == sf::Event::MouseButtonPressed && event.mouseButton.button == sf::Mouse::Left) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
./input_handler.h:16:66: error: no member named 'mouseButton' in 'sf::Event'
.....
Workaround
To make it work you need following.
1. Install version sfml2 (it is 2.6.2 now):
brew install sfml@2
brew list --versions sfml@2
sfml@2 2.6.2
2. Update make file:
-CXXFLAGS = -I/opt/homebrew/Cellar/sfml/2.6.1/include
-LDFLAGS = -L/opt/homebrew/Cellar/sfml/2.6.1/lib -lsfml-graphics -lsfml-window -lsfml-system
+CXXFLAGS = -I/opt/homebrew/Cellar/sfml@2/2.6.2/include
+LDFLAGS = -L/opt/homebrew/Cellar/sfml@2/2.6.2/lib -lsfml-graphics -lsfml-window -lsfml-system
Metadata
Metadata
Assignees
Labels
No labels