problems with boost in eclipse
Hello -- I extracted Boost.Filesystem using the BCP tool, so I could add it to my Xcode project without having to precompile. It worked great! Only problem is that I decided to move my project to Eclipse. Now, when I compile, I keep getting the following error: Description: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type Resource: boost/libs/detail/utf8_codecvt_facet.cpp Anyone know how I might try to get this to work in Eclipse? Thank you so much in advance.
2008/11/1 Z. S. O.
Hello -- I extracted Boost.Filesystem using the BCP tool, so I could add it to my Xcode project without having to precompile. It worked great! Only problem is that I decided to move my project to Eclipse. Now, when I compile, I keep getting the following error:
Description: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
Resource: boost/libs/detail/utf8_codecvt_facet.cpp
Anyone know how I might try to get this to work in Eclipse? Thank you so much in advance.
A header with #define BOOST_UTF8_BEGIN_NAMESPACE ... is missing. However, I don't know the answer, but you will have higher chances to get the right answer if you save the hole output at the eclipse console, upload it to a pastebin and give us the link. The same for the source file which triggers the error message. Best, -- Maik
Sure! The console output is below. The files in question are
utf8_codecvt_facet.cpp, which is in libs/detail, and its header file, which
is in boost/detail.
**** Build of configuration Debug for project TestProgram ****
make all
Building file: ../src/boost/libs/system/src/error_code.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/boost/libs/system/src/error_code.d"
-MT"src/boost/libs/system/src/error_code.d"
-o"src/boost/libs/system/src/error_code.o"
"../src/boost/libs/system/src/error_code.cpp"
Finished building: ../src/boost/libs/system/src/error_code.cpp
Building file: ../src/boost/libs/filesystem/src/operations.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/operations.d"
-MT"src/boost/libs/filesystem/src/operations.d"
-o"src/boost/libs/filesystem/src/operations.o"
"../src/boost/libs/filesystem/src/operations.cpp"
Finished building: ../src/boost/libs/filesystem/src/operations.cpp
Building file: ../src/boost/libs/filesystem/src/path.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/path.d"
-MT"src/boost/libs/filesystem/src/path.d"
-o"src/boost/libs/filesystem/src/path.o"
"../src/boost/libs/filesystem/src/path.cpp"
Finished building: ../src/boost/libs/filesystem/src/path.cpp
Building file: ../src/boost/libs/filesystem/src/portability.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/portability.d"
-MT"src/boost/libs/filesystem/src/portability.d"
-o"src/boost/libs/filesystem/src/portability.o"
"../src/boost/libs/filesystem/src/portability.cpp"
Finished building: ../src/boost/libs/filesystem/src/portability.cpp
Building file: ../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP
-MF"src/boost/libs/filesystem/src/utf8_codecvt_facet.d"
-MT"src/boost/libs/filesystem/src/utf8_codecvt_facet.d"
-o"src/boost/libs/filesystem/src/utf8_codecvt_facet.o"
"../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp"
Finished building: ../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp
Building file: ../src/boost/libs/detail/utf8_codecvt_facet.cpp
Invoking: GCC C++ Compiler
g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include
-I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c
-fmessage-length=0 -MMD -MP -MF"src/boost/libs/detail/utf8_codecvt_facet.d"
-MT"src/boost/libs/detail/utf8_codecvt_facet.d"
-o"src/boost/libs/detail/utf8_codecvt_facet.o"
"../src/boost/libs/detail/utf8_codecvt_facet.cpp"
/Volumes/Admin/Projects/TestProgram/src/boost/boost/detail/utf8_codecvt_facet.hpp:113:
error: expected constructor, destructor, or type conversion before 'struct'
/usr/include/assert.h:75: error: expected constructor, destructor, or type
conversion before 'extern'
../src/boost/libs/detail/utf8_codecvt_facet.cpp:28: error:
'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
../src/boost/libs/detail/utf8_codecvt_facet.cpp:111: error:
'utf8_codecvt_facet' has not been declared
../src/boost/libs/detail/utf8_codecvt_facet.cpp:119: error: non-member
function 'std::codecvt_base::result do_out(mbstate_t&, const wchar_t*, const
wchar_t*, const wchar_t*&, char*, char*, char*&)' cannot have cv-qualifier
../src/boost/libs/detail/utf8_codecvt_facet.cpp: In function
'std::codecvt_base::result do_out(mbstate_t&, const wchar_t*, const
wchar_t*, const wchar_t*&, char*, char*, char*&)':
../src/boost/libs/detail/utf8_codecvt_facet.cpp:136: error:
'get_cont_octet_out_count' was not declared in this scope
../src/boost/libs/detail/utf8_codecvt_facet.cpp: At global scope:
../src/boost/libs/detail/utf8_codecvt_facet.cpp:173: error:
'utf8_codecvt_facet' has not been declared
../src/boost/libs/detail/utf8_codecvt_facet.cpp:181: error: non-member
function 'int do_length(const mbstate_t&, const char*, const char*, size_t)'
cannot have cv-qualifier
../src/boost/libs/detail/utf8_codecvt_facet.cpp: In function 'int
do_length(const mbstate_t&, const char*, const char*, size_t)':
../src/boost/libs/detail/utf8_codecvt_facet.cpp:199: error:
'get_octet_count' was not declared in this scope
../src/boost/libs/detail/utf8_codecvt_facet.cpp: At global scope:
../src/boost/libs/detail/utf8_codecvt_facet.cpp:205: error:
'utf8_codecvt_facet' has not been declared
../src/boost/libs/detail/utf8_codecvt_facet.cpp:222: error: expected
constructor, destructor, or type conversion before 'namespace'
../src/boost/libs/detail/utf8_codecvt_facet.cpp:262: error: expected
constructor, destructor, or type conversion before 'int'
../src/boost/libs/detail/utf8_codecvt_facet.cpp:267: error: expected
constructor, destructor, or type conversion at end of input
make: *** [src/boost/libs/detail/utf8_codecvt_facet.o] Error 1
On Sun, Nov 2, 2008 at 4:04 AM, Maik Beckmann
2008/11/1 Z. S. O.
: Hello -- I extracted Boost.Filesystem using the BCP tool, so I could add it to my Xcode project without having to precompile. It worked great! Only problem is that I decided to move my project to Eclipse. Now, when I compile, I keep getting the following error:
Description: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
Resource: boost/libs/detail/utf8_codecvt_facet.cpp
Anyone know how I might try to get this to work in Eclipse? Thank you so much in advance.
A header with #define BOOST_UTF8_BEGIN_NAMESPACE ... is missing.
However, I don't know the answer, but you will have higher chances to get the right answer if you save the hole output at the eclipse console, upload it to a pastebin and give us the link.
The same for the source file which triggers the error message.
Best, -- Maik _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
If nobody knows the solution, could anyone recommend another header-only
library that lets you create directories and list the contents of a
directory in a cross-platform manner?
On Sun, Nov 2, 2008 at 9:32 PM, Z. S. O.
Sure! The console output is below. The files in question are utf8_codecvt_facet.cpp, which is in libs/detail, and its header file, which is in boost/detail.
**** Build of configuration Debug for project TestProgram ****
make all Building file: ../src/boost/libs/system/src/error_code.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/system/src/error_code.d" -MT"src/boost/libs/system/src/error_code.d" -o"src/boost/libs/system/src/error_code.o" "../src/boost/libs/system/src/error_code.cpp" Finished building: ../src/boost/libs/system/src/error_code.cpp
Building file: ../src/boost/libs/filesystem/src/operations.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/operations.d" -MT"src/boost/libs/filesystem/src/operations.d" -o"src/boost/libs/filesystem/src/operations.o" "../src/boost/libs/filesystem/src/operations.cpp" Finished building: ../src/boost/libs/filesystem/src/operations.cpp
Building file: ../src/boost/libs/filesystem/src/path.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/path.d" -MT"src/boost/libs/filesystem/src/path.d" -o"src/boost/libs/filesystem/src/path.o" "../src/boost/libs/filesystem/src/path.cpp" Finished building: ../src/boost/libs/filesystem/src/path.cpp
Building file: ../src/boost/libs/filesystem/src/portability.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/portability.d" -MT"src/boost/libs/filesystem/src/portability.d" -o"src/boost/libs/filesystem/src/portability.o" "../src/boost/libs/filesystem/src/portability.cpp" Finished building: ../src/boost/libs/filesystem/src/portability.cpp
Building file: ../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/filesystem/src/utf8_codecvt_facet.d" -MT"src/boost/libs/filesystem/src/utf8_codecvt_facet.d" -o"src/boost/libs/filesystem/src/utf8_codecvt_facet.o" "../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp" Finished building: ../src/boost/libs/filesystem/src/utf8_codecvt_facet.cpp
Building file: ../src/boost/libs/detail/utf8_codecvt_facet.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/include -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/detail/utf8_codecvt_facet.d" -MT"src/boost/libs/detail/utf8_codecvt_facet.d" -o"src/boost/libs/detail/utf8_codecvt_facet.o" "../src/boost/libs/detail/utf8_codecvt_facet.cpp" /Volumes/Admin/Projects/TestProgram/src/boost/boost/detail/utf8_codecvt_facet.hpp:113: error: expected constructor, destructor, or type conversion before 'struct' /usr/include/assert.h:75: error: expected constructor, destructor, or type conversion before 'extern' ../src/boost/libs/detail/utf8_codecvt_facet.cpp:28: error: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type ../src/boost/libs/detail/utf8_codecvt_facet.cpp:111: error: 'utf8_codecvt_facet' has not been declared ../src/boost/libs/detail/utf8_codecvt_facet.cpp:119: error: non-member function 'std::codecvt_base::result do_out(mbstate_t&, const wchar_t*, const wchar_t*, const wchar_t*&, char*, char*, char*&)' cannot have cv-qualifier ../src/boost/libs/detail/utf8_codecvt_facet.cpp: In function 'std::codecvt_base::result do_out(mbstate_t&, const wchar_t*, const wchar_t*, const wchar_t*&, char*, char*, char*&)': ../src/boost/libs/detail/utf8_codecvt_facet.cpp:136: error: 'get_cont_octet_out_count' was not declared in this scope ../src/boost/libs/detail/utf8_codecvt_facet.cpp: At global scope: ../src/boost/libs/detail/utf8_codecvt_facet.cpp:173: error: 'utf8_codecvt_facet' has not been declared ../src/boost/libs/detail/utf8_codecvt_facet.cpp:181: error: non-member function 'int do_length(const mbstate_t&, const char*, const char*, size_t)' cannot have cv-qualifier ../src/boost/libs/detail/utf8_codecvt_facet.cpp: In function 'int do_length(const mbstate_t&, const char*, const char*, size_t)': ../src/boost/libs/detail/utf8_codecvt_facet.cpp:199: error: 'get_octet_count' was not declared in this scope ../src/boost/libs/detail/utf8_codecvt_facet.cpp: At global scope: ../src/boost/libs/detail/utf8_codecvt_facet.cpp:205: error: 'utf8_codecvt_facet' has not been declared ../src/boost/libs/detail/utf8_codecvt_facet.cpp:222: error: expected constructor, destructor, or type conversion before 'namespace' ../src/boost/libs/detail/utf8_codecvt_facet.cpp:262: error: expected constructor, destructor, or type conversion before 'int' ../src/boost/libs/detail/utf8_codecvt_facet.cpp:267: error: expected constructor, destructor, or type conversion at end of input make: *** [src/boost/libs/detail/utf8_codecvt_facet.o] Error 1
On Sun, Nov 2, 2008 at 4:04 AM, Maik Beckmann < beckmann.maik@googlemail.com> wrote:
Hello -- I extracted Boost.Filesystem using the BCP tool, so I could add it to my Xcode project without having to precompile. It worked great! Only
2008/11/1 Z. S. O.
: problem is that I decided to move my project to Eclipse. Now, when I compile, I keep getting the following error:
Description: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
Resource: boost/libs/detail/utf8_codecvt_facet.cpp
Anyone know how I might try to get this to work in Eclipse? Thank you so much in advance.
A header with #define BOOST_UTF8_BEGIN_NAMESPACE ... is missing.
However, I don't know the answer, but you will have higher chances to get the right answer if you save the hole output at the eclipse console, upload it to a pastebin and give us the link.
The same for the source file which triggers the error message.
Best, -- Maik _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On Sun, Nov 2, 2008 at 9:32 PM, Z. S. O.
wrote: Sure! The console output is below. The files in question are utf8_codecvt_facet.cpp, which is in libs/detail, and its header file, which is in boost/detail. [snip] Building file: ../src/boost/libs/detail/utf8_codecvt_facet.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/inclu de -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/detail/utf8_codecvt_facet.d" -MT"src/boost/libs/detail/utf8_codecvt_facet.d" -o"src/boost/libs/detail/utf8_codecvt_facet.o" "../src/boost/libs/detail/utf8_codecvt_facet.cpp"
/Volumes/Admin/Projects/TestProgram/src/boost/boost/detail/utf 8_codecvt_facet.hpp:113: error: expected constructor, destructor, or type conversion before 'struct' /usr/include/assert.h:75: error: expected constructor, destructor, or type conversion before 'extern' ../src/boost/libs/detail/utf8_codecvt_facet.cpp:28: error: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
[snip] Are you sure that you need to compile libs/detail/utf8_codecvt_facet.cpp? boost/detail/utf8_codecvt_facet.hpp has this comment: // Until the above points are fixed, a library which wants to use utf8 must: // - include this header from one of it's headers or sources // - include the corresponding .cpp file from one of the sources // - before including either file, the library must define // - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used // - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace // - declaration. // - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable' // symbols. from which it seems that the corresponding .cpp is not designed to be built directly, but via inclusion from another Boost lib. Éric Malenfant --------------------------------------------- The easier it is to do, the harder it is to change.
It appears you are absolutely right =) I actually suspected that at first, but I excluded both the header and source file, which led to errors. Excluding only the source file leads to a perfectly clear build. Thank you! On Tue, Nov 4, 2008 at 1:51 PM, Eric MALENFANT < Eric.Malenfant@sagem-interstar.com> wrote:
On Sun, Nov 2, 2008 at 9:32 PM, Z. S. O.
wrote: Sure! The console output is below. The files in question are utf8_codecvt_facet.cpp, which is in libs/detail, and its header file, which is in boost/detail. [snip] Building file: ../src/boost/libs/detail/utf8_codecvt_facet.cpp Invoking: GCC C++ Compiler g++ -I/Volumes/Admin/Projects/TestProgram/src/stlsoft-1.9.60/inclu de -I/Volumes/Admin/Projects/TestProgram/src/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/boost/libs/detail/utf8_codecvt_facet.d" -MT"src/boost/libs/detail/utf8_codecvt_facet.d" -o"src/boost/libs/detail/utf8_codecvt_facet.o" "../src/boost/libs/detail/utf8_codecvt_facet.cpp"
/Volumes/Admin/Projects/TestProgram/src/boost/boost/detail/utf 8_codecvt_facet.hpp:113: error: expected constructor, destructor, or type conversion before 'struct' /usr/include/assert.h:75: error: expected constructor, destructor, or type conversion before 'extern' ../src/boost/libs/detail/utf8_codecvt_facet.cpp:28: error: 'BOOST_UTF8_BEGIN_NAMESPACE' does not name a type
[snip]
Are you sure that you need to compile libs/detail/utf8_codecvt_facet.cpp?
boost/detail/utf8_codecvt_facet.hpp has this comment: // Until the above points are fixed, a library which wants to use utf8 must: // - include this header from one of it's headers or sources // - include the corresponding .cpp file from one of the sources // - before including either file, the library must define // - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used // - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace // - declaration. // - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable' // symbols.
from which it seems that the corresponding .cpp is not designed to be built directly, but via inclusion from another Boost lib.
Éric Malenfant --------------------------------------------- The easier it is to do, the harder it is to change. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Eric MALENFANT
-
Maik Beckmann
-
Z. S. O.