笔记

1.7 PeekAndPump

1.6 开发板编译QT程序,C++提示版本错误

#error  This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

解决方法:

在工程文件.pro中添加:

QMAKE_CXXFLAGS+=-std=c++0x

或者

QMAKE_CXXFLAGS += -std=gnu++11
 

1.5 ~/.bashrc

export LD_LIBRARY_PATH=/usr............

1.4 NFS挂载出问题 wrong fs type, bad option, bad superblock

安装  apt-get install nfs-common 解决

1.3 使用海康库时,找不到可以找分功能代码

https://www.xuebuyuan.com/2177478.html

av_interleaved_write_frame

安装 Sqlite库、Sqlite browser

sudo apt-get install libsqlite3-dev

sudo apt-get install sqlitebrowser

直接使用sqlite

INCLUDEPATH += /usr/include/
LIBS +=-L /usr/lib/libsqlite.so.0 -lsqlite3

1、控制台输出,颜色控制

1.1.Linux
#include <iostream>
 
//the following are UBUNTU/LINUX ONLY terminal color codes.
#define RESET   "\033[0m"
#define BLACK   "\033[30m"      /* Black */
#define RED     "\033[31m"      /* Red */
#define GREEN   "\033[32m"      /* Green */
#define YELLOW  "\033[33m"      /* Yellow */
#define BLUE    "\033[34m"      /* Blue */
#define MAGENTA "\033[35m"      /* Magenta */
#define CYAN    "\033[36m"      /* Cyan */
#define WHITE   "\033[37m"      /* White */
#define BOLDBLACK   "\033[1m\033[30m"      /* Bold Black */
#define BOLDRED     "\033[1m\033[31m"      /* Bold Red */
#define BOLDGREEN   "\033[1m\033[32m"      /* Bold Green */
#define BOLDYELLOW  "\033[1m\033[33m"      /* Bold Yellow */
#define BOLDBLUE    "\033[1m\033[34m"      /* Bold Blue */
#define BOLDMAGENTA "\033[1m\033[35m"      /* Bold Magenta */
#define BOLDCYAN    "\033[1m\033[36m"      /* Bold Cyan */
#define BOLDWHITE   "\033[1m\033[37m"      /* Bold White */
 
int main(int argc, const char * argv[])
{
    std::cout< <RED      <<"Hello, World! in RED\n";
    return 0;
}

1.2.Windows


#include "stdafx.h"
#include <iostream>
#include <windows .h>
 
using namespace std;
 
void SetColor(unsigned short forecolor =4 ,unsigned short backgroudcolor =0)
{
    HANDLE hCon =GetStdHandle(STD_OUTPUT_HANDLE); //获取缓冲区句柄
    SetConsoleTextAttribute(hCon,forecolor|backgroudcolor); //设置文本及背景色
}
 
int _tmain(int argc, _TCHAR* argv[])
{
    SetColor(40,30);
    SetColor(120,20);
    SetColor(10,50);
    std::cout <<"Colored hello world for windows!\n";
    return 0;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值