fatal error: 'freetype/config/ftheader.h' file not found #include <freetype/config/ftheader.h>
Closed this issue · 3 comments
I am new to SFML and have started with following instruction on this page https://www.sfml-dev.org/tutorials/2.6/start-cmake.php. I was able to get all the setup done except running the last build command fails.
When I run the build command I get this error
cmake --build build
[ 14%] Built target sfml-system
[ 48%] Built target sfml-window
[ 49%] Building CXX object _deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o
In file included from /Users/subham/Desktop/code/SFML/cmake-sfml-project/build/_deps/sfml-src/src/SFML/Graphics/Font.cpp:35:
/Library/Frameworks/Mono.framework/Headers/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Library/Frameworks/Mono.framework/Headers/ft2build.h:56:10: note: did not find header 'config/ftheader.h' in framework 'freetype' (loaded from '/Users/subham/Desktop/code/SFML/cmake-sfml-project/build/_deps/sfml-src/extlibs/libs-osx/Frameworks')
1 error generated.
make[2]: *** [_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/Font.cpp.o] Error 1
make[1]: *** [_deps/sfml-build/src/SFML/Graphics/CMakeFiles/sfml-graphics.dir/all] Error 2
make: *** [all] Error 2
Try uninstalling mono. SFML seems to somehow pick up the freetype installation from your mono package, instead of the one shipped with SFML.
We've had a few people have this issue lately. I'm not sure if it's due to a recent change in that framework or what. Uninstalling it does fix the problem. Hopefully we can figure out a solution that isn't as invasive though.
Unfortunately mono is used by dotnet core and I cannot uninstall that. Although I tried on Windows and it works perfectly no issues what so ever. So maybe its just Macs. If I recall correctly on Mac I think there is no context separation Like I cannot have two version of dotnet installed at the same time - I can still have the binaries at a different location than default. But I did not know mono can influence cpp projects.
Anyways thanks for help. I am looking forward to learning SFML 😄.