| |
| Posted by vvmyx | PermalinkReply |
|
vvmyx
| Dear Walter!
Thanks you for the best in the world the compiler C++!
But some examples (ver 8.32 with stlport):
===================== Example 1 (Win32)=====================:
#include <bitset>
#include <string>
#include <map>
#include <iostream>
using namespace std;
void main(void)
{
map<char* , int> mymap;
mymap["First"] = 1;
mymap["Second"] = 2;
std::bitset < 32 > b = 0x12121212UL;
std::cout << "Hello" << std::endl;
std::cout << mymap["First"] << std::endl ;
std::cout << mymap["Second"] << std::endl;
std::cout << b << std::endl;
std::cout << "END" << std::endl;
}
compile with: sc hello.cpp
All Ok
============= Example 2 (same source) =====================:
D:\example>sc -msd hello.cpp
using _STLP_VENDOR_CSTD::fgetwc;
^
e:\dm832\bin\..\stlport\stlport\cwchar(199) : Error: undefined dentifier
'fgetwc'
using _STLP_VENDOR_CSTD::fgetws;
^
e:\dm832\bin\..\stlport\stlport\cwchar(200) : Error: undefined dentifier 'fgetw
s'
......... SKIP ...............
Fatal error: too many errors
--- errorlevel 1
============= Example 3 (same source) =====================:
#include <bitset>
#include <string>
#include <map>
#include <iostream>
using namespace std;
void main(void)
{
map<char* , int> mymap;
mymap["First"] = 1;
mymap["Second"] = 2;
std::bitset < 32 > b = 0x12121212UL;
std::cout << "Hello" << std::endl;
std::cout << mymap["First"] << std::endl ;
std::cout << mymap["Second"] << std::endl;
std::cout << b << std::endl;
std::cout << "END" << std::endl;
}
+ in stl_dm.h:
//# undef _STLP_NO_NAMESPACES
#define _STLP_NO_NAMESPACES
sc -msd hello.cpp
using namespace std;
^
hello.cpp(8) : Error: identifier expected
mymap["First"] = 1;
^
hello.cpp(13) : Error: integral expression expected
mymap["Second"] = 2;
^
hello.cpp(14) : Error: integral expression expected
std::cout << "Hello" << std::endl;
^
hello.cpp(17) : Error: '_STLP_cout' previously declared as something else
It was declared as: basic_ostream<char ,char_traits<char > >
It is now declared: int
std::cout << mymap["First"] << std::endl ;
^
hello.cpp(18) : Error: '_STLP_cout' previously declared as something else
Fatal error: too many errors
--- errorlevel 1
Ok, change source:
============= Example 4 =====================:
#include <bitset>
#include <string>
#include <map>
#include <iostream>
//using namespace std;
void main(void)
{
std::map<char* , int> mymap;
mymap["First"] = 1;
mymap["Second"] = 2;
std::bitset < 32 > b = 0x12121212UL;
std::cout << "Hello" << std::endl;
std::cout << mymap["First"] << std::endl ;
std::cout << mymap["Second"] << std::endl;
std::cout << b << std::endl;
std::cout << "END" << std::endl;
}
+ in stl_dm.h:
//# undef _STLP_NO_NAMESPACES
#define _STLP_NO_NAMESPACES
example>sc -msd hello.cpp
link hello/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
hello.obj(hello)
Error 42: Symbol Undefined ?_M_throw_failure@ios_base@@IACXXZ (void pascal ios_
base::_M_throw_failure(void ))
hello.obj(hello)
Error 42: Symbol Undefined ?__stl_throw_length_error@@YAXPBD@Z (void cdecl __st
l_throw_length_error(char const *))
hello.obj(hello)
Error 42: Symbol Undefined ?_M_increment@?$_Rb_global@_N@@SAPAU_Rb_tree_node_ba
se@@PAU2@@Z
hello.obj(hello)
Error 42: Symbol Undefined ?_M_decrement@?$_Rb_global@_N@@SAPAU_Rb_tree_node_ba
se@@PAU2@@Z
hello.obj(hello)
Error 42: Symbol Undefined ?_Rebalance@?$_Rb_global@_N@@SAXPAU_Rb_tree_node_bas
e@@AAPAU2@@Z
hello.obj(hello)
Error 42: Symbol Undefined ??0locale@@QAC@ABV0@@Z (pascal locale::locale(locale
const &))
hello.obj(hello)
Error 42: Symbol Undefined ??1locale@@QAC@XZ (pascal locale::~locale(void ))
hello.obj(hello)
Error 42: Symbol Undefined ?_M_use_facet@locale@@QBCPAVfacet@1@ABVid@1@@Z (face
t::locale *pascal locale::_M_use_facet(id::locale const &)const )
hello.obj(hello)
Error 42: Symbol Undefined ??1ios_base@@UAC@XZ (pascal ios_base::~ios_base(void
))
hello.obj(hello)
Error 42: Symbol Undefined ??0Init@ios_base@@QAC@XZ (pascal ios_base::Init::Ini
t(void ))
hello.obj(hello)
Error 42: Symbol Undefined ??0_Loc_init@ios_base@@QAC@XZ (pascal ios_base::_Loc
_init::_Loc_init(void ))
hello.obj(hello)
Error 42: Symbol Undefined ??1_Loc_init@ios_base@@QAC@XZ (pascal ios_base::_Loc
_init::~_Loc_init(void ))
hello.obj(hello)
Error 42: Symbol Undefined ??1Init@ios_base@@QAC@XZ (pascal ios_base::Init::~In
it(void ))
hello.obj(hello)
Error 42: Symbol Undefined ?_STLP_cout@@3V?$basic_ostream@DV?$char_traits@D@@@@
A (basic_ostream<char ,char_traits<char > > _STLP_cout)
--- errorlevel 14
Ok. add string in stl_dm.h:
============= Example 5 =====================:
# define _STLP_NO_NEW_IOSTREAMS
source as above:
example>sc -msd hello.cpp
link hello/noi;
30.01.2003 13:23 31.826 hello.exe !!!!!!!!!!!!!!!!!
I happy
BUT:
add one string
============= Example 6 =====================:
#include <sstream> //<------- this
#include <bitset>
#include <string>
#include <map>
#include <iostream>
//using namespace std;
void main(void)
{
std::map<char* , int> mymap;
mymap["First"] = 1;
mymap["Second"] = 2;
std::bitset < 32 > b = 0x12121212UL;
std::cout << "Hello" << std::endl;
std::cout << mymap["First"] << std::endl ;
std::cout << mymap["Second"] << std::endl;
std::cout << b << std::endl;
std::cout << "END" << std::endl;
}
example>sc -msd hello.cpp
Fatal error: unable to open input file '../include/sstream'
--- errorlevel 1
:(((((((
next try:
example>sc hello.cpp
Fatal error: unable to open input file '../include/sstream'
--- errorlevel 1
:(((((((
Copy original stl_dm.h to stlport and try again:
example>sc hello.cpp
link hello,,,user32+kernel32/noi;
30.01.2003 13:32 369.180 hello.exe OOOOOOOOOO!!!!!!!
next
example>sc -msd hello.cpp
Many errors...
With best regards. vvmyx
|