The raw string literal on the mac got an error, so I thought it was not compatible with C++11. When I installed gcc5 using MacPorts, the glfw3 that I had previously installed on HomeBrew was no longer recognized when I compiled it.Is there a solution to this?
terminal
$ gcc main.cpp-framework OpenGL-lglfw
main.cpp:1:24: fatal error:GLFW/glfw3.h: No such file or directory
compilation terminated.
Since GLFW/glfw3.h
appears in the error, would the compilation argument be -lglfw3
instead of -lglfw
Alternatively, the -I
option explicitly specifies the directory in which the header file resides in the include path.If /path/to/include/GLFW/glfw3.h
has a file,
$gccmain.cpp-framework OpenGL-I/path/to/include-lglfw
I downloaded the source code from the site instead of the glfw installed in brew, created the library from Cmake to makefile, and wrote down the path to which it was located, and the compilation passed.
I don't really understand......
© 2024 OneMinuteCode. All rights reserved.