target_include_directories(your_executable_name public $ {opentgl_include_dir})
target_link_libraries(your_executable_name public $ {OpenGl_libraries})
Please provide more details like your relevant section of CMakeLists.txt for getting more info and getting quicker help from community.
Now, coming to the error logs, it seems you are cross-compiling the source files using a arm-based compilers.
The error message "ld: symbol(s) not found for architecture arm64" looks to me as a linker issue and you should be having the find_package() and linking calls in CMakeLists.txt for OpenGL.
So to start with , you should follow two steps initially and see if it solves your problem:
1. Make sure the CMake build system is pointing to correct compiler tool chain path (arm compilers in here).
发布评论
评论(1)
请提供更多详细信息,例如您相关的cmakelists.txt部分,以获取更多信息并从社区获得更快的帮助。
现在,进入错误日志,似乎您正在使用基于ARM的编译器对源文件进行交叉编译。
错误消息“ ld:scholdutection ARM64找不到的符号”将我视为一个链接器问题,您应该在find_package()和cmakelists.txt中的for OpenGL中使用find_package()和链接呼叫。
因此,首先,您应该最初遵循两个步骤,看看它是否解决了您的问题:
1。确保CMAKE构建系统指向纠正编译器工具链路径(此处的ARM编译器)。
请参阅CMAKE的官方网站:
2。确保您要链接OpenGL
find_package(opengl required)
target_include_directories(your_executable_name public $ {opentgl_include_dir})
target_link_libraries(your_executable_name public $ {OpenGl_libraries})
Please provide more details like your relevant section of CMakeLists.txt for getting more info and getting quicker help from community.
Now, coming to the error logs, it seems you are cross-compiling the source files using a arm-based compilers.
The error message "ld: symbol(s) not found for architecture arm64" looks to me as a linker issue and you should be having the find_package() and linking calls in CMakeLists.txt for OpenGL.
So to start with , you should follow two steps initially and see if it solves your problem:
1. Make sure the CMake build system is pointing to correct compiler tool chain path (arm compilers in here).
Refer official website of CMake for same:
https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
2. Make sure you are linking OpenGL
find_package(OpenGL REQUIRED)
target_include_directories(your_executable_name PUBLIC ${OPENGL_INCLUDE_DIR})
target_link_libraries(your_executable_name PUBLIC ${OPENGL_LIBRARIES})