Boost logo

Boost Users :

Subject: Re: [Boost-users] Using boost library on MacOSx
From: n179911 (n179911_at_[hidden])
Date: 2009-07-24 11:41:01


Sorry. I copy-and-paste the wrong compile error:

$ g++ -o echo_client blocking_udp_echo_client.cpp
blocking_udp_echo_client.cpp:14:26: error: boost/asio.hpp: No such
file or directory
blocking_udp_echo_client.cpp:16: error: ‘boost’ has not been declared
blocking_udp_echo_client.cpp:16: error: expected nested-name-specifier
before ‘udp’
blocking_udp_echo_client.cpp:16: error: ‘udp’ has not been declared
blocking_udp_echo_client.cpp: In function ‘int main(int, char**)’:
blocking_udp_echo_client.cpp:30: error: ‘boost’ has not been declared
blocking_udp_echo_client.cpp:30: error: ‘io_service’ was not declared
in this scope
blocking_udp_echo_client.cpp:30: error: expected `;' before ‘io_service’
blocking_udp_echo_client.cpp:32: error: ‘udp’ has not been declared

It seems the compiler can't find the boost library on MacOS X. But I
have installed it via:

$ sudo port install boost
It seems download and compile fine on my local machine.

On Fri, Jul 24, 2009 at 8:30 AM, Steven Watanabe<watanabesj_at_[hidden]> wrote:
> AMDG
>
> Rush Manbert wrote:
>>
>> On Jul 23, 2009, at 10:49 PM, n179911 wrote:
>>>
>>> But then i tried to compile a simple echo client example from
>>> http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/examples.html
>>>
>>> I get a bunch of compiler errors. I am using "g++ -o block_client
>>> blocking_udp_echo_client.cpp "
>>>
>>> Here are some of the errors:
>>> $ g++ -o block_client blocking_udp_echo_client.cpp
>>> blocking_udp_echo_client.cpp:68:10: error: #include expects "FILENAME"
>>> or <FILENAME>
>>
>> If I'm reading this correctly, the error is on line 68 of
>> blocking_udp_echo_client.cpp, but when I follow your link, then the link to
>> that file, copy the example and paste it into vi, I see that the file is
>> only 60 lines long.
>>
>> I would guess that the file you're compiling doesn't contain what you
>> think it does, or you added stuff to the end of the file that isn't legal C.
>
> Perhaps you're trying to compile html?
>
> In Christ,
> Steven Watanabe
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net