WSL, CMake &openMP copy_FILE error
Hey
I'm trying to run this cmake but I keep getting an error >
cmake_minimum_required(VERSION 3.10.2)
project(debugCrash)
set(CMAKE_CXX_STANDARD 17)
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" -std=c++17 -fopenmp)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
add_executable(debugCrash main.cpp)
CMake Error at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:306 (try_compile):
Cannot copy output executable
'/mnt/d/RnD/debugCrash/cmake-build-debug/CMakeFiles/CMakeTmp/cmTC_03c85'
to destination specified by COPY_FILE:
'/mnt/d/RnD/debugCrash/cmake-build-debug/CMakeFiles/FindOpenMP/ompver_C.bin'
Wht do I do ? :- )
---
Edit I'm also getting
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY)
Despite installing openGl
Please sign in to leave a comment.
Hi!
>Despite installing openGl
How have you installed OpenGL on your WSL instance? If you try building the project directly on WSL (not in CLion), does it work?
I'll check that as soon as I get back to pc. But what about OpenMP ? that is preinstalled with gcc so what do I do there ?
I believe I tried this
https://stackoverflow.com/questions/34001996/how-to-use-cmake-to-find-and-link-openglmesa-package-in-ubuntu
and
https://wiki.qt.io/Install_Qt_5_on_Ubuntu
No luck so far, neither openMP or openGL works. I didnt try native project on WSL yet, all I tried now is to run cmake.
>I didnt try native project on WSL yet, all I tried now is to run cmake.
Please try transferring your CMake project to WSL and building it there using Terminal. It will help to determine whether the issue is CLion-related or not.
I can also say I have been getting this issue on WSL2 when attempting to find OpenGL with CMake.
I installed OpenGL and FreeGLUT through the command: