From: Christoffer M. <Mol...@in...> - 2010-11-30 13:17:44
|
Hi everyone, I'm hitting the following compilation error using Visual Studio 2010 and Boost 1.45. The example compiles perfectly using v0.7, however. 1>------ Build started: Project: NetlibTest, Configuration: Debug Win32 ------ 1> hello_world_server.cpp 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(28): error C2065: 'or_' : undeclared identifier 1> c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(37) : see reference to class template instantiation 'boost::network::http::traits::version<Message>' being compiled 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(29): error C2275: 'boost::network::is_sync<Message::tag>' : illegal use of this type as an expression 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(32): error C2974: 'boost::mpl::if_' : invalid template argument for 'T1', type expected 1> c:\greenfield\include\boost\mpl\if.hpp(56) : see declaration of 'boost::mpl::if_' 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(35): error C2977: 'boost::mpl::if_' : too many template arguments 1> c:\greenfield\include\boost\mpl\if.hpp(56) : see declaration of 'boost::mpl::if_' 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(36): error C2143: syntax error : missing ',' before '>' 1> Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example: 1> - add -D_WIN32_WINNT=0x0501 to the compiler command line; or 1> - add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions. 1> Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target). Looks like a using directive got lost on the way somewhere. Best regards, Christoffer M. |
From: Dean M. B. <mik...@gm...> - 2010-11-30 14:26:03
|
Hi Christoffer, On Tue, Nov 30, 2010 at 8:50 PM, Christoffer Mollenhoff <Mol...@in...> wrote: > > I’m hitting the following compilation error using Visual Studio 2010 and > Boost 1.45. The example compiles perfectly using v0.7, however. > Are you building with CMake? > > 1>c:\cpp-netlib-0.8\boost\network\protocol\http\message\traits\version.hpp(28): > error C2065: 'or_' : undeclared identifier > It looks like there's a missing include here. Can you try adding: #include <boost/mpl/or.hpp> At the top of the file, maybe around line 13? That should fix it. > > Looks like a using directive got lost on the way somewhere. > Or just missing an include. It's odd that this doesn't show up in GCC. Can you try the above include directive, and report back if it fixes things? Thanks and I hope this helps. -- Dean Michael Berris deanberris.com |
From: Christoffer M. <Mol...@in...> - 2010-11-30 16:08:17
|
Hi, > Are you building with CMake? No, I just created a simple project with the server example and added Boost and cpp-netlib to the list of include folders. > It looks like there's a missing include here. Can you try adding: > #include <boost/mpl/or.hpp> That took care of it. Thanks for the quick assistance! Best regards, Christoffer M. |
From: Dean M. B. <mik...@gm...> - 2010-11-30 16:19:03
|
On Wed, Dec 1, 2010 at 12:01 AM, Christoffer Mollenhoff <Mol...@in...> wrote: > Hi, > >> Are you building with CMake? > > No, I just created a simple project with the server example and added Boost and cpp-netlib to the list of include folders. > Ah, alright. That's good to know. You might want to check out the asynchronous HTTP server example and see whether that might be better for your use case. It is after all what's new in 0.8. :) >> It looks like there's a missing include here. Can you try adding: >> #include <boost/mpl/or.hpp> > > That took care of it. Thanks for the quick assistance! > No worries, I'm glad to be able to help. Glyn, do you think we need a 0.8.1 to address this? It might be something others might uncover as well. -- Dean Michael Berris deanberris.com |
From: Nelson, E. - 2 <eri...@ba...> - 2010-11-30 16:43:33
|
Dean Michael Berris wrote: > > Or just missing an include. It's odd that this doesn't show up in GCC. > Can you try the above include directive, and report back if it fixes > things? > In my experience, there are quite a few cases like this in cpp-netlib... is there some automated tool that can check to make sure the proper headers are included? A script that just tried to compile each file by itself should do the trick, right? Erik ---------------------------------------------------------------------- This message w/attachments (message) is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this message is prohibited. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications (EC) traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or free of errors or viruses. References to "Sender" are references to any subsidiary of Bank of America Corporation. Securities and Insurance Products: * Are Not FDIC Insured * Are Not Bank Guaranteed * May Lose Value * Are Not a Bank Deposit * Are Not a Condition to Any Banking Service or Activity * Are Not Insured by Any Federal Government Agency. Attachments that are part of this EC may have additional important disclosures and disclaimers, which you should read. This message is subject to terms available at the following link: http://www.bankofamerica.com/emaildisclaimer. By messaging with Sender you consent to the foregoing. |
From: Dean M. B. <mik...@gm...> - 2010-11-30 16:55:39
|
On Wed, Dec 1, 2010 at 12:43 AM, Nelson, Erik - 2 <eri...@ba...> wrote: > Dean Michael Berris wrote: >> >> Or just missing an include. It's odd that this doesn't show up in GCC. >> Can you try the above include directive, and report back if it fixes >> things? >> > > In my experience, there are quite a few cases like this in cpp-netlib... is there some automated tool that can check to make sure the proper headers are included? > The real reason for this is that in reality, I want people to just include the "supported" header -- which in this case should be boost/network/include/http/server.hpp. There's really no other explanation -- not sure if that was what Christoffer did, and if so that would be a bug. > A script that just tried to compile each file by itself should do the trick, right? > Patches welcome. ;) -- Dean Michael Berris deanberris.com |
From: Glyn M. <gly...@gm...> - 2010-12-01 08:57:57
|
Dean, Erik, On 30 November 2010 17:46, Dean Michael Berris <mik...@gm...>wrote: > On Wed, Dec 1, 2010 at 12:43 AM, Nelson, Erik - 2 > <eri...@ba...> wrote: > > Dean Michael Berris wrote: > >> > >> Or just missing an include. It's odd that this doesn't show up in GCC. > >> Can you try the above include directive, and report back if it fixes > >> things? > >> > > > > In my experience, there are quite a few cases like this in cpp-netlib... > is there some automated tool that can check to make sure the proper headers > are included? > > > > The real reason for this is that in reality, I want people to just > include the "supported" header -- which in this case should be > boost/network/include/http/server.hpp. > > There's really no other explanation -- not sure if that was what > Christoffer did, and if so that would be a bug. > > > A script that just tried to compile each file by itself should do the > trick, right? > > > > Patches welcome. ;) > I added this to the issue tracker: https://github.com/cpp-netlib/cpp-netlib/issues/issue/8/#issue/8/comment/579978 Thanks, Glyn |
From: Dean M. B. <mik...@gm...> - 2010-12-01 12:24:32
|
On Wed, Dec 1, 2010 at 4:57 PM, Glyn Matthews <gly...@gm...> wrote: > Dean, Erik, > > On 30 November 2010 17:46, Dean Michael Berris <mik...@gm...> > wrote: >> >> Patches welcome. ;) > > > I added this to the issue tracker: > https://github.com/cpp-netlib/cpp-netlib/issues/issue/8/#issue/8/comment/579978 Cool, thanks Glyn. Now I'm not sure how to do the scripting in a cross-platform manner -- maybe use Python or something, not really sure how to go about that. Ideas, and of course patches would be very much welcome. :) -- Dean Michael Berris deanberris.com |