Boost logo

Boost :

Subject: Re: [boost] Error while linking boost. spirit
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-06-23 14:15:18


On Jun 23, 2013, at 10:33 AM, "Paul A. Bristow" <pbristow_at_[hidden]> wrote:

>> -----Original Message-----
>> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Bjorn Reese
>> Sent: Sunday, June 23, 2013 10:56 AM
>> To: boost_at_[hidden]
>> Subject: Re: [boost] Error while linking boost. spirit
>>
>> On 06/23/2013 11:40 AM, ... ... wrote:

> Please read the list policies at http://www.boost.org/community/policy.html. Don't top post or overquote, and use a real name.

>>> synthax_analyser.cpp: In function 'int
>>> main()':synthax_analyser.cpp:24:4: error: 'lex' does not name a type
>>
>> All Boost symbols reside in the "boost" namespace, so you should add the following after the includes:
>>
>> using namespace boost;
>
> I'm glad to see the OP has got this to work, but would caution that occasionally the above can get you into trouble (as can "using namespace std:" and if Boost expands with GIT and modularity it will happen more often when names clash).
>
> Being more specific (or at least more local), for example, "using boost::spririt;" is to be encouraged.

+1

However, using declarations are even better targeted.

___
Rob

(Sent from my portable computation engine)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk