-
Notifications
You must be signed in to change notification settings - Fork 1
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
Issues with Mac OS #1
Comments
Got boids to run on my M1 MacBook Air! (Thanks, Rael!) The problem seems to be that glViewport is a macro on the Mac. I added the line #define glViewport (x, y, width, height) immediately before the definition of main() in main.cpp and the app no longer segfaults. It runs, but more slowly that I expected. Lowering the number of boids helps. The problem with the link.txt file still remains. Sometimes it's necessary to add -framework GLUT to the last line in the file boids/build/app/CMakefiles/main.dir/link.txt and other times it's already there. Regardless, I always need to save the file with an external editor. Presumably just touching the file would work if the -framework GLUT flag is present. So, after making the above change to main.cpp, my procedure for building boids is: cd build Unless I do this workaround., the make step always fails because the GLUT functions don't link. Presumably the CMakeLists.txt can be edited to make the problem disappear, but my cmake skills are unfortunately lacking. |
I did some more Googling and I believe the link.txt problem is fixed! Modify the file boids/app/CMakeLists.txt by changing the target_link_library statement to: target_link_libraries(main ${GLUT_LIBRARY} GLUT::GLUT m ${OPENGL_LIBRARIES} ${GLEW_LIBRARY} Eigen3::Eigen) (Found this in https://stackoverflow.com/questions/70314595/cmake-cant-link-glut-library-after-system-update .) Now the expected process works as it should. |
Hi!
Thanks for your Medium article and for this site!
I am unable to run this on my Mac (macOS Monterey 12.7.1).
Fit, the link step fails to find the glut library. I can workaround that by placing a call to -framework GLUT appropriately. So far I have to do the manually in the Makefile (actually in a link.txt file) because I can't figure out how to make cake do it for me.
Second, and more fatally (?), when the program links correctly, it segfaults.
Any clue as to what might be going on?
Thanks for your help and thanks for this project!
Murray
The text was updated successfully, but these errors were encountered: