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;
}