BeagleBone Black + BlackLib- 程序 + 库编译
BeagleBone Black + BlackLib- program+library compilation
我需要用我的程序编译库(只是main.cpp)。该库是BlackLib 2.0(已经有如何编译blacklib(c ++),但我无法重现结果...也许我误解了什么)。
无论如何,3个要点:
1) 主要.cpp包括:
#include <iostream>
#include <unistd.h>
#include <BlackCore.h>
#include <BlackDef.h>
#include <BlackErr.h>
#include <BlackLib.h>
#include <BlackUART.h>
2) 所有文件(库文件 - .cpp & .h ...和 main.cpp) 位于 1 个文件夹中:
/home/martin/uart/uart_5#
3)编译文件的命令(直接在BeagleBone Black上)
g++ *.cpp -o main -std=c++11
问题:
BlackI2C.cpp: In member function 'bool BlackLib::BlackI2C::close()':
BlackI2C.cpp:133:13: error: '::close' has not been declared
BlackI2C.cpp: In member function 'bool BlackLib::BlackI2C::writeLine(uint8_t*, size_t)':
BlackI2C.cpp:287:13: error: '::write' has not been declared
BlackI2C.cpp: In member function 'bool BlackLib::BlackI2C::readLine(uint8_t*, size_t)':
BlackI2C.cpp:302:13: error: '::read' has not been declared
BlackSPI.cpp: In member function 'bool BlackLib::BlackSPI::close()':
BlackSPI.cpp:213:13: error: '::close' has not been declared
BlackUART.cpp: In member function 'bool BlackLib::BlackUART::close()':
BlackUART.cpp:166:13: error: '::close' has not been declared
BlackUART.cpp: In member function 'bool BlackLib::BlackUART::read(char*, size_t)':
BlackUART.cpp:226:12: error: '::read' has not been declared
BlackUART.cpp: In member function 'std::string BlackLib::BlackUART::read()':
BlackUART.cpp:244:24: error: '::read' has not been declared
BlackUART.cpp: In member function 'bool BlackLib::BlackUART::write(char*, size_t)':
BlackUART.cpp:262:12: error: '::write' has not been declared
BlackUART.cpp: In member function 'bool BlackLib::BlackUART::write(std::string)':
BlackUART.cpp:276:12: error: '::write' has not been declared
BlackUART.cpp: In member function 'bool BlackLib::BlackUART::transfer(char*, char*, size_t, uint32_t)':
BlackUART.cpp:293:12: error: '::write' has not been declared
BlackUART.cpp:303:23: error: 'usleep' was not declared in this scope
BlackUART.cpp:309:12: error: '::read' has not been declared
BlackUART.cpp: In member function 'std::string BlackLib::BlackUART::transfer(std::string, uint32_t)':
BlackUART.cpp:324:12: error: '::write' has not been declared
BlackUART.cpp:334:23: error: 'usleep' was not declared in this scope
BlackUART.cpp:339:24: error: '::read' has not been declared
BlackUART.cpp: In member function 'BlackLib::BlackUART& BlackLib::BlackUART::operator<<(std::string&)':
BlackUART.cpp:960:12: error: '::write' has not been declared
BlackUART.cpp: In member function 'BlackLib::BlackUART& BlackLib::BlackUART::operator>>(std::string&)':
BlackUART.cpp:977:24: error: '::read' has not been declared
main.cpp:4:23: fatal error: BlackCore.h: No such file or directory
compilation terminated.
我有点鄙视。BackLib常见问题解答也无济于事。
我已经发布了如何编译 blacklib (c++) 的答案,标题为完整指南 如何直接在运行埃的 BEAGLEBONE BLACK (rev C) 上编译 BLACKLIB
您需要将头文件 unistd.h 添加到 BlackUART.h
相关文章:
- 如何从测试脚本中运行WAF编译C++程序?
- 如何使用命令提示符、记事本和 MinGW 使用主文件、头文件和实现文件编译C++程序?
- 在Yocto上本地构建和编译C / C++程序
- 我无法在代码块中编译c ++程序。它给了我错误
- 在 turbo c++ 中使用 TCC 从 cmd 编译C++程序
- 如何在Linux中编译C 程序以生成Windows可执行文件
- 在Python中编译C 程序时,请尝试捕获OS错误
- 在Windows命令提示符中使用G 编译C 程序
- 如何使用HDF5源代码编译c程序
- 如何在Mac终端中编译C ++程序
- 设置 VS 代码以编译C++程序
- 无法在 Ubuntu 上编译 c++ 程序
- 无法使用 libcurl 库编译 c++ 程序
- 编译C 程序,该程序将SFML与MINGW一起到端口,从Linux到Windows
- 编译C 程序时具有逻辑错误,该程序应将任意大的数字表示为字符串
- 如何在 Windows 命令提示符下使用 Dev C++ 编译器编译 c++ 程序
- 在cygwin中使用mingw编译器编译c ++程序时缺少dll。
- 无法在Windows上编写的Linux上编译C程序
- 架构的未定义符号x86_64惠姆使用G 编译C 程序
- 指定netbeans用来编译C++程序的完整编译命令