C/C++包管理器conon入门使用
conan包管理器安装
$] yum install centos-release-scl -y
$] yum install rh-python36 -y
$] python --verison
$] yum groupinstall 'Development Tools' -y
$] yum install python-pip -y
$] pip …
专注于数字孪生及工业软件SaaS的研发
$] yum install centos-release-scl -y
$] yum install rh-python36 -y
$] python --verison
$] yum groupinstall 'Development Tools' -y
$] yum install python-pip -y
$] pip …
首先安装libstdc,glibc静态库
yum install libstdc++-static glibc-static -y
CMakefile中增加 set(CMAKE_EXE_LINKER_FLAGS “-static”) 即可
CMakeLists.txt …
dumpbin.exe通常在下面的路径下:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64
将该路径加入到PATH环境变量中即可
$ dumpbin …
https://www.vtk.org/files/release/8.2/VTK-8.2.0.zip
unzip VTK-8.2.0.zip
cd VTK-8.2.0
mkdir build
建立编译脚本
auto_build_release.bat
cmake …
cmake -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake \
-DANDROID_NDK=$NDK_ROOT -DANDROID_ABI="armeabi-v7a" \ …
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_SYSROOT /home/devel/rasp-pi-rootfs)
set(CMAKE_STAGING_PREFIX …
除了采用include_directories和link_directories指定SDL位置,
还可以使用Findmake的方式进行库依赖
windows下下载 https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip
解压后工程目录如下:
cmake3/
|-- build
| |-- airplane.bmp
| |-- auto_build.bat
| `-- nature.bmp
|-- …
通过设置cmakefile.txt的选项进行配置
set(CMAKE_CXX_FLAGS " -std=c++11 -Wall")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" ) # …
源码:https://github.com/panyingyun/cmakedemo
cmakeb/
|-- build
| |-- auto_build_close_macro.bat
| |-- auto_build_close_macro.sh
| |-- auto_build_open_macro.bat
| …