Problem including boost/shared_ptr.hpp

Hello Everyone, I have been trying to include boost/shared_ptr.hpp in a project I am working on, but the compiler keeps giving me the following errors: /usr/include/boost/shared_ptr.hpp:341: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:346: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:352: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:357: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:362: error: expected unqualified-id before string constant However, the most mind-boggling part is that if I include the same header file in a program by itself (i.e., outside my project) it compiles fine. Can anybody help me? I really appreciate any suggestion. Regards, Marcelo Aroca Tomim

Marcelo Tomim:
Hello Everyone,
I have been trying to include boost/shared_ptr.hpp in a project I am working on, but the compiler keeps giving me the following errors:
/usr/include/boost/shared_ptr.hpp:341: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:346: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:352: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:357: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:362: error: expected unqualified-id before string constant
However, the most mind-boggling part is that if I include the same header file in a program by itself (i.e., outside my project) it compiles fine.
My guess is that someone has #defined a "reset" macro.

AMDG Marcelo Tomim wrote:
Hello Everyone,
I have been trying to include boost/shared_ptr.hpp in a project I am working on, but the compiler keeps giving me the following errors:
/usr/include/boost/shared_ptr.hpp:341: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:346: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:352: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:357: error: expected unqualified-id before string constant /usr/include/boost/shared_ptr.hpp:362: error: expected unqualified-id before string constant
However, the most mind-boggling part is that if I include the same header file in a program by itself (i.e., outside my project) it compiles fine.
It sounds like a macro problem. Take a look at the preprocessed output. In Christ, Steven Watanabe
participants (3)
-
Marcelo Tomim
-
Peter Dimov
-
Steven Watanabe