升压1.55不使用Visual Studio 2013的工作 [英] Boost 1.55 doesn't work with Visual Studio 2013

查看:630
本文介绍了升压1.55不使用Visual Studio 2013的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经正确编译升压二进制文件,并遵循所有的指示,但我得到了很多错误,我不知道为什么!

下面是我的'有'的设置:

这是code我用来测试升压:

 的#include<升压/ asio.hpp> //包括升压
#包括LT&;&iostream的GT;
使用命名空间std;
使用空间boost :: ASIO; //节省大量的打字//这是我们的端口需要连接值
#IFDEF _WIN32
// Windows使用COM端口,这取决于什么COM口电缆线已插好。
为const char * PORT =COM4;
#其他
// * nix的COM端口
为const char * PORT =开发/ ttyS3
#万一
//注:除波特率以下所有条件都完全相同的默认值//我们在沟通一下波特率
serial_port_base :: BAUD_RATE波特(9600);
//多大每个数据的数据包(默认为8位)
serial_port_base :: character_size CSIZE(8);
//是做什么用的流量控制(默认为无)
serial_port_base :: FLOW_CONTROL FLOW(serial_port_base :: FLOW_CONTROL ::无);
//是干什么用的奇偶校验(默认为无)
serial_port_base ::奇偶奇偶校验(serial_port_base ::奇偶::无);
//多少停止位(缺省为一)
serial_port_base :: stop_bits STOP(serial_port_base :: stop_bits ::之一);诠释的main()
{
    //创建会谈串行设备的I / O服务
    io_service对象io的;
    //创建串行设备,注意它采用IO服务和端口名称
    serial_port端口(IO,PORT);    //经历,并设置所有选项,因为我们需要他们
    //所有的人都列出来,但默认值大多数情况下
    port.set_option(波特);
    port.set_option(CSIZE);
    port.set_option(流);
    port.set_option(奇偶校验);
    port.set_option(停止);    //缓冲存储命令
    //这个设备读取8位,这意味着一个无符号的字符,如说明
    //与设备不同而不同,首先检查手册
    无符号字符命令[1] = {0};    //在用户值读取将被发送到设备
    INT输入;
    CIN>>输入;    //简单的循环,因为只有良好的值为[0,255]
    输入一个负数时//断裂。
    //演员将过大的数字转换成范围。
    而(输入> = 0)
    {
        //转换我们读的数量到目标数据类型
        命令[0] =的static_cast< unsigned char型>(输入);        //这是通过线路发送实际位命令
        //注意它需要一个流和ASIO ::缓​​冲区
        //流是我们的serial_port
        //缓冲区使用我们的命令缓冲区构建
        //指令数来发送
        写(端口,缓冲区(命令,1));        //读取下一个输入值
        CIN>>输入;
    }    //全部完成发送指令
    返回0;
}

我的错误(我不能给出任何信息,因为我不知道是什么的平均值或者是什么原因导致它们):

  1智能感知:标识符WSA13是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 70 19 Test3的
2智能感知:标识符WSA102是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 73 34 Test3的
3智能感知:标识符WSA100是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 76 20 Test3的
4智能感知:标识符WSA113是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 79 23 Test3的
5智能感知:标识符WSA103是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 82 21 Test3的
6智能感知:标识符WSA106是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 90 24 Test3的
7智能感知:标识符WSA107是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 93 24 Test3的
8智能感知:标识符WSA108是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 96 22 Test3的
9智能感知:标识符WSA9是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 99 20 Test3的
10智能感知:标识符WSA14是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 102 11 Test3的
11智能感知:标识符WSA110是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 105 22 Test3的
12智能感知:标识符WSA112是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 108 17 Test3的
13智能感知:标识符WSA4是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 111 17 Test3的
14智能感知:标识符WSA22是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 114 22 Test3的
15智能感知:标识符WSA115是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 117 18 Test3的
16智能感知:标识符WSA38是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 120 19 Test3的
17智能感知:标识符WSA116是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 123 18 Test3的
18智能感知:标识符WSA117是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 126 19 Test3的
19智能感知:标识符WSA118是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 129 25 Test3的
20智能感知:标识符WSA24是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 132 20 Test3的
21智能感知:标识符WSA119是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 135 21 Test3的
22智能感知:标识符WSA123是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 148 24 Test3的
23智能感知:标识符WSA126是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 151 19 Test3的
24智能感知:标识符WSA128是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 154​​ 16 Test3的
25智能感知:标识符WSA130是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 162 29 Test3的
26智能感知:标识符WSA138是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 168 15 Test3的
27智能感知:标识符WSA140是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 176 17 Test3的
28智能感知:标识符WSA11001L是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 182 20 Test3的
29智能感知:标识符WSA11002L是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 185 30 Test3的
30智能感知:标识符WSA11004L是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 188 13 Test3的
31智能感知:标识符WSA11003L是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ error.hpp 191 17 Test3的
32智能感知:标识符BOOST_ASIO_OS_DEF_0x00000002是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 66 22 Test3的
33智能感知:标识符BOOST_ASIO_OS_DEF_0x00000001是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 67 15 Test3的
34智能感知:标识符BOOST_ASIO_OS_DEF_0x00000004是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 68 20 Test3的
35智能感知:标识符BOOST_ASIO_OS_DEF_0x00000008是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 69 23 Test3的
36智能感知:标识符BOOST_ASIO_OS_DEF_0x00000800是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 70 17 Test3的
37智能感知:标识符BOOST_ASIO_OS_DEF_0x00000100是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 71 20 Test3的
38智能感知:标识符BOOST_ASIO_OS_DEF_0x00000400是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ resolver_query_base.hpp 72 26 Test3的
39智能感知:标识符BOOST_ASIO_OS_DEF_0是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 51 3 Test3的
40智能感知:标识符BOOST_ASIO_OS_DEF_12是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 52 3 Test3的
41智能感知:标识符BOOST_ASIO_OS_DEF_13是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 80 3 Test3的
42智能感知:标识符BOOST_ASIO_OS_DEF_9是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 108 3 Test3的
43智能感知:标识符BOOST_ASIO_OS_DEF_10是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 144 3 Test3的
44智能感知:标识符BOOST_ASIO_OS_DEF_11是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ multicast.hpp 181 3 Test3的
45智能感知:标识符BOOST_ASIO_OS_DEF_0x0001是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ tcp.hpp 126 37 Test3的
46智能感知:标识符BOOST_ASIO_OS_DEF_0是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ unicast.hpp 59 3 Test3的
47智能感知:标识符BOOST_ASIO_OS_DEF_4是不确定的C:\\库\\提升\\ boost_1_55_0 \\提升\\ ASIO \\ IP \\ unicast.hpp 60 3 Test3的


解决方案

提升1.55发行说明


  

已知错误与Visual Studio 2013 / VISUAL C ++ 12


  
  

的Visual Studio 2013发布的释放过程比较晚,所以存在一些尚未解决的问题。这些措施包括:搜索结果
       - 序列化不能因为缺少的编译包括搜索结果。
       - 从Boost.Container的allocator_traits使用has_member_function_callable_with导致编译错误(#9332)搜索结果。
       - 在库,比如无序和多指标,与调用初始化列表重载函数会导致编译错误,与Visual C ++声称重载是模糊的。这是一个Visual C ++的错误,如果有一个很好的解决办法,目前尚不清楚。这不会影响code不使用初始化列表,或者使用不需要的隐式转换(即容器的确切值类型的初始化列表)的初始化列表。搜索结果
       - 主题:ex_scoped_thread编译失败(#9333)


需要注意的是不完全支持VC ++ 12,即使不加速编译并不意味着它不会有虫子运行时(这意味着,不幸的是,你将不得不作出的变通他们的) 。如果你发现在升压更多的bug,请务必将其报告给他们。

I have compiled the boost binaries correctly and followed all of the instructions, but I am getting a lot of errors, and I don't know why!

Here is my 'include' setup:

This is the code I used to test boost:

#include <boost/asio.hpp> // include boost
#include <iostream>
using namespace std;
using namespace boost::asio;  // save tons of typing

// These are the values our port needs to connect
#ifdef _WIN32
// windows uses com ports, this depends on what com port your cable is plugged in to.
const char *PORT = "COM4";
#else
// *nix com ports
const char *PORT = "dev/ttyS3";
#endif
// Note: all the following except BAUD are the exact same as the default values

// what baud rate do we communicate at
serial_port_base::baud_rate BAUD(9600);
// how big is each "packet" of data (default is 8 bits)
serial_port_base::character_size CSIZE(8);
// what flow control is used (default is none)
serial_port_base::flow_control FLOW(serial_port_base::flow_control::none);
// what parity is used (default is none)
serial_port_base::parity PARITY(serial_port_base::parity::none);
// how many stop bits are used (default is one)
serial_port_base::stop_bits STOP(serial_port_base::stop_bits::one);

int main()
{
    // create the I/O service that talks to the serial device
    io_service io;
    // create the serial device, note it takes the io service and the port name
    serial_port port(io, PORT);

    // go through and set all the options as we need them
    // all of them are listed, but the default values work for most cases
    port.set_option(BAUD);
    port.set_option(CSIZE);
    port.set_option(FLOW);
    port.set_option(PARITY);
    port.set_option(STOP);

    // buffer to store commands
    // this device reads 8 bits, meaning an unsigned char, as instructions
    // varies with the device, check the manual first
    unsigned char command[1] = { 0 };

    // read in user value to be sent to device
    int input;
    cin >> input;

    // Simple loop, since the only good values are [0,255]
    //  break when a negative number is entered.
    // The cast will convert too big numbers into range.
    while (input >= 0)
    {
        // convert our read in number into the target data type
        command[0] = static_cast<unsigned char>(input);

        // this is the command that sends the actual bits over the wire
        // note it takes a stream and a asio::buffer
        // the stream is our serial_port
        // the buffer is constructed using our command buffer and
        //  the number of instructions to send
        write(port, buffer(command, 1));

        // read in the next input value
        cin >> input;
    }

    // all done sending commands
    return 0;
}

My errors (I can't give any info because I don't know what the mean or what causes them):

1   IntelliSense: identifier "WSA13" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 70  19  Test3
2   IntelliSense: identifier "WSA102" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 73  34  Test3
3   IntelliSense: identifier "WSA100" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 76  20  Test3
4   IntelliSense: identifier "WSA113" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 79  23  Test3
5   IntelliSense: identifier "WSA103" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 82  21  Test3
6   IntelliSense: identifier "WSA106" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 90  24  Test3
7   IntelliSense: identifier "WSA107" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 93  24  Test3
8   IntelliSense: identifier "WSA108" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 96  22  Test3
9   IntelliSense: identifier "WSA9" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 99  20  Test3
10  IntelliSense: identifier "WSA14" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 102 11  Test3
11  IntelliSense: identifier "WSA110" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 105 22  Test3
12  IntelliSense: identifier "WSA112" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 108 17  Test3
13  IntelliSense: identifier "WSA4" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 111 17  Test3
14  IntelliSense: identifier "WSA22" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 114 22  Test3
15  IntelliSense: identifier "WSA115" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 117 18  Test3
16  IntelliSense: identifier "WSA38" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 120 19  Test3
17  IntelliSense: identifier "WSA116" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 123 18  Test3
18  IntelliSense: identifier "WSA117" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 126 19  Test3
19  IntelliSense: identifier "WSA118" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 129 25  Test3
20  IntelliSense: identifier "WSA24" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 132 20  Test3
21  IntelliSense: identifier "WSA119" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 135 21  Test3
22  IntelliSense: identifier "WSA123" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 148 24  Test3
23  IntelliSense: identifier "WSA126" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 151 19  Test3
24  IntelliSense: identifier "WSA128" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 154 16  Test3
25  IntelliSense: identifier "WSA130" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 162 29  Test3
26  IntelliSense: identifier "WSA138" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 168 15  Test3
27  IntelliSense: identifier "WSA140" is undefined  c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 176 17  Test3
28  IntelliSense: identifier "WSA11001L" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 182 20  Test3
29  IntelliSense: identifier "WSA11002L" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 185 30  Test3
30  IntelliSense: identifier "WSA11004L" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 188 13  Test3
31  IntelliSense: identifier "WSA11003L" is undefined   c:\libs\boost\boost_1_55_0\boost\asio\error.hpp 191 17  Test3
32  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000002" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    66  22  Test3
33  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000001" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    67  15  Test3
34  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000004" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    68  20  Test3
35  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000008" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    69  23  Test3
36  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000800" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    70  17  Test3
37  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000100" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    71  20  Test3
38  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x00000400" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\resolver_query_base.hpp    72  26  Test3
39  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0" is undefined c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  51  3   Test3
40  IntelliSense: identifier "BOOST_ASIO_OS_DEF_12" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  52  3   Test3
41  IntelliSense: identifier "BOOST_ASIO_OS_DEF_13" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  80  3   Test3
42  IntelliSense: identifier "BOOST_ASIO_OS_DEF_9" is undefined c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  108 3   Test3
43  IntelliSense: identifier "BOOST_ASIO_OS_DEF_10" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  144 3   Test3
44  IntelliSense: identifier "BOOST_ASIO_OS_DEF_11" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\multicast.hpp  181 3   Test3
45  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0x0001" is undefined    c:\libs\boost\boost_1_55_0\boost\asio\ip\tcp.hpp    126 37  Test3
46  IntelliSense: identifier "BOOST_ASIO_OS_DEF_0" is undefined c:\libs\boost\boost_1_55_0\boost\asio\ip\unicast.hpp    59  3   Test3
47  IntelliSense: identifier "BOOST_ASIO_OS_DEF_4" is undefined c:\libs\boost\boost_1_55_0\boost\asio\ip\unicast.hpp    60  3   Test3

解决方案

From the Boost 1.55 release notes:

Known Bugs with Visual Studio 2013/Visual C++ 12

Visual Studio 2013 was released quite late in the release process, so there exist several unresolved issues. These include:

- Serialization can't compile because of a missing include.

- Using has_member_function_callable_with from Boost.Container's allocator_traits causes a compile error (#9332).

- In libraries such as Unordered and MultiIndex, calling overloaded functions with initializer lists can result in a compile error, with Visual C++ claiming that the overloads are ambiguous. This is a Visual C++ bug and it isn't clear if there's a good workaround. This won't affect code that doesn't use initializer lists, or uses an initializer list that doesn't require an implicit conversion (i.e. an initializer list of the container's exact value type).

- Thread: ex_scoped_thread compile fails (#9333).

Note that VC++ 12 isn't fully supported, and even if Boost does compile doesn't necessarily mean that it won't have runtime bugs (which means, sadly, you'll have to make work-arounds for them). If you ever find more bugs in Boost, be sure to report it to them.

这篇关于升压1.55不使用Visual Studio 2013的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆