zoukankan      html  css  js  c++  java
  • linux Ubuntu14.04 python(c++版本) tesorflow(python版本)c++

    一、环境变量配置:

    export M2_HOME=/home/ustcjing/Maven/apache-maven-3.5.0
    export JAVA_HOME=/usr/lib/jvm8/java
    export JRE_HOME=${JAVA_HOME}/jre
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
    export PATH=${JAVA_HOME}/bin:/root/anaconda3/bin:${M2_HOME}/bin:/home/ustcjing/SocLib/soclib/utils/bin:/home/ustcjing/Soclib/Installaion/binutils/bin:/home/ustcjing/Soclib/build/mipsel:/home/ustcjing/SocLib/Installaion/binutils/bin:$PATH
    export SYSTEMC=/home/ustcjing/SystemC
    export PKG_CONFIG_PATH=usr/local/lib/pkgconfig:/root/anaconda3/lib/pkgconfig:$PKG_CONFIG_PATH
    export LIBRARY_PATH=/usr/lib:/usr/local/lib:/root/anaconda3/lib:$LIBRARY_PATH
    export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/root/anaconda3/lib:/root/anaconda3/bin:$LD_LIBRARY_PATH
    export C_INCLUDE_PATH=/usr/local/include:/root/anaconda3/include/python3.5m:$C_INCLUDE_PATH
    export CPLUS_INCLUDE_PATH=/usr/local/include:/root/anaconda3/include/python3.5m:$CPLUS_INCLUDE_PATH

    二、Makefile文件

    CFLAGS = -g -Wall
    LIBS = $(shell pkg-config opencv --cflags --libs)
    INCLUDES=$(shell pkg-config python3 --cflags --libs)
    OBJS = test.cpp
    CXX = g++
    all: test
    test: $(OBJS)
        $(CXX) $(CFLAGS) $(OBJS) $(LIBS) $(INCLUDES) -o $@ 
    clean:
        rm -rf *.o

    三、更新Cmake

    sudo add-apt-repository ppa:george-edison55/cmake-3.x
    sudo apt-get update
    sudo apt-get upgrade 
    cmake --version

    四、OpenCv的安装参数

    cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON3_EXECUTABLE=/home/ustcjing/Anaconda3/bin/python3 -D PYTHON_INCLUDE_DIR=/home/ustcjing/Anaconda3/include/python3.5m -D PYTHON_LIBRARY=/home/ustcjing/Anaconda3/lib/libpython3.5m.so -D PYTHON3_NUMPY_INCLUDE_DIRS=/home/ustcjing/Anaconda3/pkgs/numpy-1.14.0-py35h3dfced4_0/lib/python3.5/site-packages/numpy/core/include -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D PYTHON_EXECUTABLE=/home/ustcjing/Anaconda3/bin/python3 -D BUILD_TIFF=ON -D BUILD_EXAMPLES=ON ..

    五、libstdc++的链接问题

    ln -s libstdc++.so.6.0.24 libstdc++.so.6
    ln -s libstdc++.so.6.0.24 libstdc++.so
  • 相关阅读:
    7-31 jmu-分段函数l (20 分)
    7-29 jmu-python-不同进制数 (10 分)
    7-28 摄氏温度转换华氏温度 (5 分)
    7-23 图的字典表示 (20 分)
    7-24 判断素数 (20 分)
    7-22 输出10个不重复的英文字母 (50 分)
    【转载】C#批量插入数据到Sqlserver中的三种方式
    天气预报api-汇总
    【转载】VS2015 + EF6连接MYSQL5.6
    【转摘】TFS上分支和标签的用法
  • 原文地址:https://www.cnblogs.com/acm-jing/p/9764463.html
Copyright © 2011-2022 走看看