![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
CV/NLP大虾
https://github.com/hanhui269/
展开
-
c++时间打印
c++时间输出原创 2022-09-13 11:43:19 · 918 阅读 · 0 评论 -
cmake安装以及更新
wget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gzwget https://cmake.org/files/v3.6/cmake-3.6.2.tar.gztar -zxvf cmake-3.6.2.tar.gzcd cmake-3.6.2./bootstrapgmakegmake installln -sf /usr/local/bin/cmake /usr/bin/cmake3查看终端版本cmake3 --version...原创 2022-04-20 17:18:37 · 1545 阅读 · 0 评论 -
Ubuntu18.04下编译安装torchvision
一、下载源码包NVIDIA 各种cuda下载包torchvison官网地址本次调用是CUDA,所以下载的的是0.8.1版本二、编译新建torchvision文件夹,用来存放最终的安装文件(将来调用是用的include和lib)mkdir buildcd build进入build文件夹后打开终端,开始进行编译(这里注意下:不要按照GitHub官方的教程来编译,那个教程的有些命令参数暂时不是很全,会报错的!)首先我们输入如下命令(注意把相关的路径修改为自己的路径):cmake -DCMAK原创 2021-08-06 10:55:00 · 1223 阅读 · 0 评论 -
ubuntu中C语言获得时间
#include <stdio.h> // C标准库用来调用printf#include <sys/time.h> // gettimeofday()的头文件#include <unistd.h> // 加入延迟更加方便我们观察int main(){ struct timeval start, end; gettimeofday( &start, NULL ); printf("start :原创 2021-08-02 20:03:32 · 560 阅读 · 0 评论 -
CPP绑定到python端(1)
Python扩展模块简介Python与C/C++交互的方案有多种,如Python C API,SWIG,SIP,ctypes,cpython,cffi,boost.python等。Python只是一个语言规范,有很多具体实现,CPython是标准Python,由C编写,Python脚本被编译成CPython字节码,然后由虚拟机解释执行,垃圾回收使用引用计数,Python与C/C++混合编程本质是基于CPython解释器。其它的Python实现包括Jython、IronPython、PyPy、Pyston原创 2021-02-20 18:15:33 · 188 阅读 · 0 评论 -
Cmake使用
cmake初步使用project (HELLO) #指定项目名称,生成的VC项目的名称;>>使用${HELLO_SOURCE_DIR}表示项目根目录include_directories:指定头文件的搜索路径,相当于指定gcc的-I参数>> include_directories (${HELLO_SOURCE_DIR}/Hello) #增加Hello为include目录link_directories:动态链接库或静态链接库的搜索路径,相当于gcc的-L参数原创 2021-02-08 17:21:55 · 165 阅读 · 0 评论 -
__attribute__((visibility(“default“)))
attribute((visibility(“default”)))//hidden决定变成动态库后,是否可被访问执行。#ifndef FBC_LIBRARY_LIBRARY_HPP_#define FBC_LIBRARY_LIBRARY_HPP_// reference: https://gcc.gnu.org/wiki/Visibility// https://developer.apple.com/library/content/documentation/Develo原创 2021-02-07 18:28:09 · 390 阅读 · 0 评论 -
GDB C++ debug
gdb ./myprogHere are some basic commands to get you going:b lineno - set a break point at line ‘lineno’b srcfile:lineno - set a break point in source file ‘srcfile’ at line ‘lineno’r - run the programs - step through the next line of codec - contin原创 2021-02-03 18:27:32 · 131 阅读 · 0 评论 -
CLion常见使用方法
配置单个cpp文件执行原创 2020-07-28 10:33:26 · 583 阅读 · 0 评论 -
python读取c++/c
c代码:int max(int a,int b){ return a>b?a:b;}c++代码#include<iostream>using namespace std;class TestLib{ public: void display(); void display(int a); }; void TestLib::display() { cout<<"First disp原创 2020-06-14 18:02:51 · 588 阅读 · 0 评论 -
Python调用C/C++
Python调用C/C++的两种方法使用Python扩展使用ctypes模块直接加载soreference https://zhuanlan.zhihu.com/p/39098612原创 2020-03-16 10:48:04 · 55 阅读 · 0 评论 -
W10安装c++编译器
Win10安装gcc、g++、make下载安装包:**1.**进入官网https://osdn.net/projects/mingw/releases/之后下载mingw-get-setup.exe2.安装完成**3.**出现对话框,选几个安装4.. Win+R 打开运行,输入cmd回车执行下面命令行安装a. 安装gcc:输入 mingw32-get install gcc 回车b...原创 2020-03-15 18:56:35 · 336 阅读 · 0 评论