Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS X compilation #1

Closed
JanSimek opened this issue Jan 31, 2016 · 2 comments
Closed

OS X compilation #1

JanSimek opened this issue Jan 31, 2016 · 2 comments

Comments

@JanSimek
Copy link

Hi, I just want to say thank you for making this public. You have no idea how much time I spent looking for grid based pathfinding tutorial for SFML.

I just had to make a tiny change to make it compile on OS X:

diff --git a/include/Node.h b/include/Node.h
index 35bb251..58a29b5 100644
--- a/include/Node.h
+++ b/include/Node.h
@@ -2,6 +2,7 @@

 #include <memory>
 #include <vector>
+#include <cstdlib>
 #include <SFML/System/Vector2.hpp>

 template<typename T, typename V>
diff --git a/src/Game.cpp b/src/Game.cpp
index b988352..8bcef7c 100644
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -22,7 +22,7 @@ void Game::run(){

 void Game::loadTexts(int height){
        //Load font
-       font.loadFromFile("d:/SFMLpro/Sansation.ttf");
+       font.loadFromFile("media/Sansation.ttf");

        const auto green = sf::Color(0, 140, 0);

Thanks again.

@juanBalian35
Copy link
Owner

I am really happy it helped you! As soon as I am able to I will update the repo so OS X users can use it without making any changes :).

@juanBalian35
Copy link
Owner

I updated my repository, now OS X users can run the code perfectly following the rules provided in the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants