因為需要porting一個STL C++的案子到手邊的eCos機器上..
請問有人嘗試過build STLPort for eCos成功過嗎?因為我看國外討論區.
http://www.zylin.com/stlport.html 感覺應該是可以的.可惜他的cvs不動作.
於是我就自己動手看著他的patch慢慢改..奮戰一天後..下場如下...
i386-elf -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority -D__ECOS__=1 -fno-vtable-gc -fexceptions -frtti -I -O0 -g dll_main.cpp -c -o ../lib/obj/ecos/Release/dll_main.o
cc1plus: warning: ignoring command line option '-finit-priority'
cc1plus: warning: (it is valid for C++ but not the selected language)
In file included from ../stlport/new:36,
from ../stlport/stl/_new.h:50,
from ../stlport/stl/_alloc.h:60,
from ../stlport/memory:32,
from dll_main.cpp:38:
/gnutools/i386-elf/i386-elf/include/new:79: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:79: declaration of `operator new' as
non-function
/gnutools/i386-elf/i386-elf/include/new:79: invalid declarator
/gnutools/i386-elf/i386-elf/include/new:80: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:80: declaration of `operator new []' as
non-function
/gnutools/i386-elf/i386-elf/include/new:80: invalid declarator
/gnutools/i386-elf/i386-elf/include/new:83: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:83: parse error before `::' token
/gnutools/i386-elf/i386-elf/include/new:83: `operator new' takes type `size_t'
(`long unsigned int') as first parameter
/gnutools/i386-elf/i386-elf/include/new:84: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:84: parse error before `::' token
/gnutools/i386-elf/i386-elf/include/new:84: `operator new' takes type `size_t'
(`long unsigned int') as first parameter
/gnutools/i386-elf/i386-elf/include/new:89: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:89: parse error before `*' token
/gnutools/i386-elf/i386-elf/include/new:89: `operator new' takes type `size_t'
(`long unsigned int') as first parameter
/gnutools/i386-elf/i386-elf/include/new: In function `void* operator new(long
unsigned int, ...)':
/gnutools/i386-elf/i386-elf/include/new:89: `__p' undeclared (first use this
function)
/gnutools/i386-elf/i386-elf/include/new:89: (Each undeclared identifier is
reported only once for each function it appears in.)
/gnutools/i386-elf/i386-elf/include/new: At global scope:
/gnutools/i386-elf/i386-elf/include/new:90: `size_t' undeclared in namespace `
std'
/gnutools/i386-elf/i386-elf/include/new:90: parse error before `*' token
/gnutools/i386-elf/i386-elf/include/new:90: `operator new' takes type `size_t'
(`long unsigned int') as first parameter
In file included from ../stlport/stl/_alloc.h:60,
from ../stlport/memory:32,
from dll_main.cpp:38:
../stlport/stl/_new.h: In function `void* _STL::__stl_new(long unsigned int)':
../stlport/stl/_new.h:86: call of overloaded `operator new(size_t&)' is
ambiguous
<internal>:86: candidates are: void* operator new(long unsigned int)
/gnutools/i386-elf/i386-elf/include/new:89: void* operator
new(long unsigned int, ...)
In file included from ../stlport/stl/_alloc.h:68,
from ../stlport/memory:32,
from dll_main.cpp:38:
../stlport/stl/_construct.h:57:6: warning: "_MSC_VER" is not defined
In file included from ../stlport/stl/_streambuf.h:27,
from ../stlport/stl/_ios.c:28,
from ../stlport/stl/_ios.h:172,
from ../stlport/stl/_istream.h:27,
from ../stlport/istream:36,
from ../stlport/stl/_bitset.h:63,
from ../stlport/bitset:51,
from dll_main.cpp:47:
../stlport/stl/_stdio_file.h:738:3: #error The C++ I/O library is not configured for this compiler
In file included from ../stlport/stl/_ios.c:28,
from ../stlport/stl/_ios.h:172,
from ../stlport/stl/_istream.h:27,
from ../stlport/istream:36,
from ../stlport/stl/_bitset.h:63,
from ../stlport/bitset:51,
from dll_main.cpp:47:
../stlport/stl/_streambuf.h: In constructor `_STL::basic_streambuf<char,
_STL::char_traits<char> >::basic_streambuf()':
../stlport/stl/_streambuf.h:354: `_FILE_I_set' undeclared (first use this
function)
../stlport/stl/_streambuf.h:355: `_FILE_O_set' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::eback() const':
../stlport/stl/_streambuf.h:362: `_FILE_I_begin' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::gptr() const':
../stlport/stl/_streambuf.h:363: `_FILE_I_next' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::egptr() const':
../stlport/stl/_streambuf.h:364: `_FILE_I_end' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `void
_STL::basic_streambuf<char, _STL::char_traits<char> >::gbump(int)':
../stlport/stl/_streambuf.h:365: `_FILE_I_bump' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::pbase() const':
../stlport/stl/_streambuf.h:383: `_FILE_O_begin' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::pptr() const':
../stlport/stl/_streambuf.h:384: `_FILE_O_next' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `char*
_STL::basic_streambuf<char, _STL::char_traits<char> >::epptr() const':
../stlport/stl/_streambuf.h:385: `_FILE_O_end' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `void
_STL::basic_streambuf<char, _STL::char_traits<char> >::pbump(int)':
../stlport/stl/_streambuf.h:387: `_FILE_O_bump' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `int
_STL::basic_streambuf<char, _STL::char_traits<char> >::sputc(char)':
../stlport/stl/_streambuf.h:429: `_FILE_O_avail' undeclared (first use this
function)
../stlport/stl/_streambuf.h:431: `_FILE_O_postincr' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `streamsize
_STL::basic_streambuf<char, _STL::char_traits<char> >::in_avail()':
../stlport/stl/_streambuf.h:452: `_FILE_I_avail' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `int
_STL::basic_streambuf<char, _STL::char_traits<char> >::snextc()':
../stlport/stl/_streambuf.h:458: `_FILE_I_preincr' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `int
_STL::basic_streambuf<char, _STL::char_traits<char> >::sbumpc()':
../stlport/stl/_streambuf.h:465: `_FILE_I_postincr' undeclared (first use this
function)
../stlport/stl/_streambuf.h: In member function `int
_STL::basic_streambuf<char, _STL::char_traits<char> >::sputbackc(char)':
../stlport/stl/_streambuf.h:482: `_FILE_I_predecr' undeclared (first use this
function)
make: *** [../lib/obj/ecos/Release/dll_main.o] Error 1