GAMES101环境配置记录 wsl+ubuntu22.04+vscode+VcXsrv
安装 wsl, g++, eigen, cmake
略
配置opencv
[root@DESKTOP-31LJ6LM ~/g101/h1/build]
$ cmake ..
-- OpenCV ARCH:
-- OpenCV RUNTIME:
-- OpenCV STATIC: OFF
CMake Warning at /mnt/e/DevelopeTools/opencv/opencv/build/OpenCVConfig.cmake:190 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
CMake Error at CMakeLists.txt:4 (find_package):
Found package configuration file:
/mnt/e/DevelopeTools/opencv/opencv/build/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
-- Configuring incomplete, errors occurred!
See also "/root/g101/h1/build/CMakeFiles/CMakeOutput.log".
捣鼓了大半天,总算在(wsl)ubuntu 22.04上配好了opencv开发环境
参考,包括但不限于:
https://blog.csdn.net/weixin_52402390/article/details/122341561
https://blog.csdn.net/Undefinedefity/article/details/106180033
其中,在make -j时, 我出现了缺openjpeg.h头文件的错误,导致make: *** [Makefile:****] 错误 2
解决方案:
https://github.com/uclouvain/openjpeg/blob/master/INSTALL.md
在补好缺的依赖后一定把之前opencv build的删掉,重新cmake,make一遍
wsl xfce4 连接 windows VcXsrv
参考:https://www.bilibili.com/video/BV1RK411n79v
1.配置
sudo vim /etc/resolv.conf
记住其中的IP
sudo vim ~/.bashrc
加入如下两行,此处打码部分即为上方的IP
2.启动VcXsrv
3.wsl输入 startxfce4
本文来自博客园,作者:泥烟,CSDN同名, 转载请注明原文链接:https://www.cnblogs.com/Knight02/articles/16736474.html