Hopson97 / HopsonCraft

A minecraft clone written using C++, SFML, OpenGL and GLEW.
MIT License
599 stars 76 forks source link

Cannot compile on MacOS #48

Closed yccgabriel closed 6 years ago

yccgabriel commented 7 years ago

I tried to run cmake . on my mac, the follow error generated. it was running on the master branch

Gabriels-MacBook-Pro:HopsonCraft gabriel$ cmake .
CMake Error at CMakeLists.txt:42 (find_package):
  By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "SFML", but
  CMake did not find one.

  Could not find a package configuration file provided by "SFML" with any of
  the following names:

    SFMLConfig.cmake
    sfml-config.cmake

  Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set
  "SFML_DIR" to a directory containing one of the above files.  If "SFML"
  provides a separate development package or SDK, be sure it has been
  installed.

-- Configuring incomplete, errors occurred!
See also "/tmp/HopsonCraft/CMakeFiles/CMakeOutput.log".

When I tried to compile it on older commit, say the V1.0 tag. The cmake . pass but make command failed with following error.

[  1%] Building CXX object CMakeFiles/game.dir/Source/Camera.cpp.o
/tmp/HopsonCraft/Source/Camera.cpp:17:38: error: non-local lambda expression cannot have a
      capture-default
    static Function_Toggle_Key lock([&]()
                                     ^
1 error generated.

Just wondering will there be a compilation guide?

Rydgel commented 7 years ago

It compiles fine now, but for some reason crash for me.

2017-05-16 22:36:39.224 game[43923:2130762] ApplePersistence=YES
Warning. Compatibility profile not supported on this platform.
Error. Unable to create the context. Retrying without shared context.
Warning. New context created without shared context.
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 3.3 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Created: version = 4.1 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = true ; debug = false ; sRGB = false
[1]    43923 segmentation fault  ./game
willeccles commented 7 years ago

Interesting, it seems to be worried because your OpenGL version is higher than the requested one, unless I am reading this wrong. Not sure what to make of that. However, the error (a segfault) is definitely reasonable, but hard to find without debugging further.

aaronlifton commented 7 years ago

Also getting this warning on OSX, ending up replacing experimental/filesystem with boost/filesystem and the game runs, however it is just a blue square with music.