gpt4 book ai didi

c++ - 尽管包含在 PATH 中,但无法识别 Boost 库文件

转载 作者:行者123 更新时间:2023-11-28 02:20:27 25 4
gpt4 key购买 nike

Boost 库头文件包含在 PATH AND SYMBOLS 中,但构建程序会生成错误消息:

10:27:13 **** Incremental Build of configuration gcc-debug for project DB8 ****
make MODE=debug CONFIGNAME=gcc-debug all
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `mkdir -p "out/gcc-debug/" && echo "-g -Wall - I/usr/include -fno-stack-protector -DXMLPARSER=libxml -DWITH_PARSIM - DWITH_NETBUILDER -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include" -I"C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn" -IC:/local/boost_1_59_0/boost -I. - IC:/Users/LuisH.Forchesatto/Downloads/omnetpp-4.6/include" >out/gcc-debug//.last- copts'
defaultSensor.cc
In file included from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/connection.h:33:0,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:30,
from dbWriteWin.h:6,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/warning.h:40:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning (disable : 4290)
^
In file included from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/variant.h:38:0,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/connection.h:35,
from C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:30,
from dbWriteWin.h:6,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:48:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning (disable : 4290)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:52:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(push)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:53:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(disable: 4275)
^
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/cppconn/exception.h:58:0: warning: ignoring #pragma warning [- Wunknown-pragmas]
#pragma warning(pop)
^
In file included from dbWriteWin.h:6:0,
from defaultSensor.cc:6:
C:/Program Files (x86)/MySQL/MySQL Connector C++ 1.1.6/include/mysql_connection.h:31:32: fatal error: boost/shared_ptr.hpp: No such file or directory
#include <boost/shared_ptr.hpp>
^
compilation terminated.
make: *** [out/gcc-debug//defaultSensor.o] Error 1
Makefile:94: recipe for target 'out/gcc-debug//defaultSensor.o' failed

10:27:14 Build Finished (took 1s.183ms)

库已安装在系统中,文件夹/文件存在于计算机中且路径正确。什么可能导致此错误?

路径和符号的内容: https://dl.dropboxusercontent.com/u/85576999/paths%20and%20symbols.png

boost 库文件夹的内容: https://dl.dropboxusercontent.com/u/85576999/boost%20folder.png

最佳答案

  1. 不要在路径中使用空格。我建议将 MySQL 连接器库移动(或重新安装)到名称简单没有空格 的文件夹,例如:c:\mysqlconnector
  2. 检查是否也为 C++ 语言设置了 boost 的路径 - 在 Path and Symbols 屏幕上有 Assembly 语言。
  3. 考虑these cluses鲁迪提供。

关于c++ - 尽管包含在 PATH 中,但无法识别 Boost 库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32718292/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com