c++ - dm832c.zip + stlport
- Mike Comperchio (23/23) Jan 09 2003 I downloaded and installed the 832 compiler, and then the stlport from t...
- Walter (9/31) Jan 09 2003 Try adding:
- Mike Comperchio (38/74) Jan 09 2003 that got me further, I still have a question...
- Walter (9/85) Jan 09 2003 I don't know. STL has lots of dependencies on things, and without a comp...
- Mike Comperchio (13/108) Jan 09 2003 Oh well...I'll putz with it a while. I really, really, really, really wa...
I downloaded and installed the 832 compiler, and then the stlport from the DM website. Now I can't compilet what was a working build...:( sc -c -mn -5 -a8 -Ae -g -c -I..\include -I$c:\sleepycat\dbinc -mn -5 -a8 -Ae -g -DDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS -DHAVE_OPENGL MyLife.cpp C:\DM\BIN\..\include\stl/_alloc.h(134) : Error: undefined identifier '__stl_new' C:\DM\BIN\..\include\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete' typedef fpos<mbstate_t> streampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(116) : Error: type-argument expected for parameter '_StateT' of template 'fpos' typedef fpos<mbstate_t> wstreampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(117) : Error: type-argument expected for parameter '_StateT' of template 'fpos' const string *pdbTasks; ^ mylife.h(50) : Error: ';' expected following declaration of struct member Fatal error: too many errors --- errorlevel 1 Thanks Michael
Jan 09 2003
Try adding: using namespace::std; to your source. Also, to use STLport you'll need a -I\dm\stlport, what you're using here is the SGI STL. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkcfv$1u22$1 digitaldaemon.com...I downloaded and installed the 832 compiler, and then the stlport from the DM website. Now I can't compilet what was a working build...:(sc -c -mn -5 -a8 -Ae -g -c -I..\include -I$c:\sleepycat\dbinc -mn -5 -a8 -Ae-g -DDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS -DHAVE_OPENGL MyLife.cpp C:\DM\BIN\..\include\stl/_alloc.h(134) : Error: undefined identifier '__stl_new' C:\DM\BIN\..\include\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete' typedef fpos<mbstate_t> streampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(116) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' typedef fpos<mbstate_t> wstreampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(117) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' const string *pdbTasks; ^ mylife.h(50) : Error: ';' expected following declaration of struct member Fatal error: too many errors --- errorlevel 1 Thanks Michael
Jan 09 2003
that got me further, I still have a question... this code: template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > class map { public: // typedefs: typedef _Key key_type; typedef _Tp data_type; typedef _Tp mapped_type; typedef pair<const _Key, _Tp> value_type; typedef _Compare key_compare; class value_compare : public binary_function<value_type, value_type, bool> { friend class map<_Key,_Tp,_Compare,_Alloc>; protected : _Compare _M_comp; value_compare(_Compare __c) : _M_comp(__c) {} public: bool operator()(const value_type& __x, const value_type& __y) const { return _M_comp(__x.first, __y.first); } }; produces: sc D:\MYSQL++\EXAMPLES\resetdb.cpp -Ae -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1 -Ic:\dm\stlport -Ic:\mysql\include -Id:\mysql++\include -oD:\MYSQL++\EXAMPL ES\resetdb.obj Error: c:\dm\stlport\stl/_map.h(63): need explicit cast for function parameter 1 to get c:\dm\stlport\stl/_map.h(63): from: const Type_info*const c:\dm\stlport\stl/_map.h(63): to : Type_info* "Walter" <walter digitalmars.com> wrote in message news:avkd9e$1ug2$1 digitaldaemon.com...Try adding: using namespace::std; to your source. Also, to use STLport you'll need a -I\dm\stlport, what you're using here is the SGI STL. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkcfv$1u22$1 digitaldaemon.com...theI downloaded and installed the 832 compiler, and then the stlport fromsc -c -mn -5 -a8 -Ae -g -c -I..\include -I$c:\sleepycat\dbinc -mn -5 -a8 -AeDM website. Now I can't compilet what was a working build...:(MyLife.cpp-g -DDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS -DHAVE_OPENGLmemberC:\DM\BIN\..\include\stl/_alloc.h(134) : Error: undefined identifier '__stl_new' C:\DM\BIN\..\include\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete' typedef fpos<mbstate_t> streampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(116) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' typedef fpos<mbstate_t> wstreampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(117) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' const string *pdbTasks; ^ mylife.h(50) : Error: ';' expected following declaration of structFatal error: too many errors --- errorlevel 1 Thanks Michael
Jan 09 2003
I don't know. STL has lots of dependencies on things, and without a complete example, there's not much I can suggest except to try whittling down the example to the smallest one that will reproduce it. Also, there is no \dm\include\stl directory on the official release. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkge3$20in$1 digitaldaemon.com...that got me further, I still have a question... this code: template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > class map { public: // typedefs: typedef _Key key_type; typedef _Tp data_type; typedef _Tp mapped_type; typedef pair<const _Key, _Tp> value_type; typedef _Compare key_compare; class value_compare : public binary_function<value_type, value_type, bool> { friend class map<_Key,_Tp,_Compare,_Alloc>; protected : _Compare _M_comp; value_compare(_Compare __c) : _M_comp(__c) {} public: bool operator()(const value_type& __x, const value_type& __y) const { return _M_comp(__x.first, __y.first); } }; produces: scD:\MYSQL++\EXAMPLES\resetdb.cpp -Ae -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1-Ic:\dm\stlport -Ic:\mysql\include -Id:\mysql++\include -oD:\MYSQL++\EXAMPLES\resetdb.obj Error: c:\dm\stlport\stl/_map.h(63): need explicit cast for function parameter 1 to get c:\dm\stlport\stl/_map.h(63): from: const Type_info*const c:\dm\stlport\stl/_map.h(63): to : Type_info* "Walter" <walter digitalmars.com> wrote in message news:avkd9e$1ug2$1 digitaldaemon.com...sc -c -mn -5 -a8 -Ae -g -c -I..\include -I$c:\sleepycat\dbinc -mn -5 -a8 -AeTry adding: using namespace::std; to your source. Also, to use STLport you'll need a -I\dm\stlport, what you're using here is the SGI STL. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkcfv$1u22$1 digitaldaemon.com...theI downloaded and installed the 832 compiler, and then the stlport fromDM website. Now I can't compilet what was a working build...:(MyLife.cpp-g -DDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS -DHAVE_OPENGLmemberC:\DM\BIN\..\include\stl/_alloc.h(134) : Error: undefined identifier '__stl_new' C:\DM\BIN\..\include\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete' typedef fpos<mbstate_t> streampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(116) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' typedef fpos<mbstate_t> wstreampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(117) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' const string *pdbTasks; ^ mylife.h(50) : Error: ';' expected following declaration of structFatal error: too many errors --- errorlevel 1 Thanks Michael
Jan 09 2003
Oh well...I'll putz with it a while. I really, really, really, really want to use DM! and not MSnerd Thanks for quick response...have a great day... Michael "Walter" <walter digitalmars.com> wrote in message news:avkik4$21tv$1 digitaldaemon.c om...I don't know. STL has lots of dependencies on things, and without acompleteexample, there's not much I can suggest except to try whittling down the example to the smallest one that will reproduce it. Also, there is no \dm\include\stl directory on the official release. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkge3$20in$1 digitaldaemon.com...less<_Key> ),that got me further, I still have a question... this code: template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare,{_STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > class map { public: // typedefs: typedef _Key key_type; typedef _Tp data_type; typedef _Tp mapped_type; typedef pair<const _Key, _Tp> value_type; typedef _Compare key_compare; class value_compare : public binary_function<value_type, value_type, bool> { friend class map<_Key,_Tp,_Compare,_Alloc>; protected : _Compare _M_comp; value_compare(_Compare __c) : _M_comp(__c) {} public: bool operator()(const value_type& __x, const value_type& __y) constD:\MYSQL++\EXAMPLES\resetdb.cpp -Ae -mn -C -WA -S -3 -a8 -c -gf -D_CONSOLE=1return _M_comp(__x.first, __y.first); } }; produces: sc-Ic:\dm\stlport -Ic:\mysql\include -Id:\mysql++\include -oD:\MYSQL++\EXAM PLfromES\resetdb.obj Error: c:\dm\stlport\stl/_map.h(63): need explicit cast for function parameter 1 to get c:\dm\stlport\stl/_map.h(63): from: const Type_info*const c:\dm\stlport\stl/_map.h(63): to : Type_info* "Walter" <walter digitalmars.com> wrote in message news:avkd9e$1ug2$1 digitaldaemon.com...Try adding: using namespace::std; to your source. Also, to use STLport you'll need a -I\dm\stlport, what you're using here is the SGI STL. "Mike Comperchio" <mcmprch adelphia.net> wrote in message news:avkcfv$1u22$1 digitaldaemon.com...I downloaded and installed the 832 compiler, and then the stlportsc -c -mn -5 -a8 -Ae -g -c -I..\include -I$c:\sleepycat\dbinc -mn -5 -a8 -AetheDM website. Now I can't compilet what was a working build...:(MyLife.cpp-g -DDEBUG -DFOX_BIGENDIAN=0 -DWIN32 -D_WINDOWS -DHAVE_OPENGLmemberC:\DM\BIN\..\include\stl/_alloc.h(134) : Error: undefined identifier '__stl_new' C:\DM\BIN\..\include\stl/_alloc.h(135) : Error: undefined identifier '__stl_delete' typedef fpos<mbstate_t> streampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(116) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' typedef fpos<mbstate_t> wstreampos; ^ C:\DM\BIN\..\include\stl/char_traits.h(117) : Error: type-argumentexpectedfor parameter '_StateT' of template 'fpos' const string *pdbTasks; ^ mylife.h(50) : Error: ';' expected following declaration of structFatal error: too many errors --- errorlevel 1 Thanks Michael
Jan 09 2003
The code snippet below is the header from the STL map container, and will not help diagnose the problem.. in your case, the problem is a faulty "less" predicate: struct Test { Test() { } ~Test() { } int i; // non trivial }; struct less { bool operator()(Test& t, Test& r) { return true; } }; std::map<Test, int, less> m; void main() { } The code above generates an error in line 63 of _map.h because it expects the "less" predicate to define an operator() like: bool operator()(const Test& t, const Test& r) { return true; } I am sure that others will be willing to help you if you provide more details of source code that *uses* the compiler or *uses* STL. Hope this helps get you moving along, Richardless<_Key> ),template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare,_STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > class map {
Jan 09 2003
"Richard" <fractal clark.net> wrote in message news:avkn3m$24qs$1 digitaldaemon.com...The code above generates an error in line 63 of _map.h because it expectsthe"less" predicate to define an operator() like: bool operator()(const Test& t, const Test& r) { return true; }Thanks for figuring this out. One of the major weaknesses of STL is trying to figure out what is wrong when things go wrong with it.
Jan 09 2003