Re: [Mingw-w64-public] C++ cout executable size

2017-06-04 Thread bob by
2017-06-02 15:47 GMT+04:00 bob by > Can somebody here write a replacement for the standard cout, that will be > able to print strings and integers, and internally will just redirect to > puts and itoa? I'm only starting with C++, I'm not sure how to do it. > So, I'm t

Re: [Mingw-w64-public] C++ cout executable size

2017-06-03 Thread bob by
2017-06-02 17:30 GMT+04:00 LRN : > On 6/2/2017 3:53 PM, bob by wrote: > > On 2017-06-02 16:23 GMT+04:00 LRN wrote: > >> On 6/2/2017 2:47 PM, bob by wrote: > >>> Can somebody here write a replacement for the standard cout, that will > be > >>> able

Re: [Mingw-w64-public] C++ cout executable size

2017-06-03 Thread bob by
2017-06-03 12:11 GMT+04:00 Mateusz MikuĊ‚a : > Here is ios_base::Init https://github.com/gcc-mirror/ > gcc/blob/master/libstdc%2B%2B-v3/include/std/iostream#L74 > If you really want to understand what compiler put into your executable > you have to disassemble it. > Bear in mind that even if you kn

Re: [Mingw-w64-public] C++ cout executable size

2017-06-02 Thread bob by
2017-06-03 5:26 GMT+04:00 Liu Hao : > On 2017/6/3 0:18, bob by wrote: > >> Can't find the code of std::ios_base::Init >> >> It should be somewhere in here, but I can't find it: >> https://gcc.gnu.org/onlinedocs/gcc-6.3.0/libstdc++/api/a00801.html >>

Re: [Mingw-w64-public] C++ cout executable size

2017-06-02 Thread bob by
2017-06-02 22:24 GMT+04:00 Ruben Van Boxem : > Be sure to check the final program code size in case of using such a > utility library vs just the C++ standard library. You might be surprised... > > Also important to note c++ isn't just an object oriented language. It is so > much more. If you get

Re: [Mingw-w64-public] C++ cout executable size

2017-06-02 Thread bob by
2017-06-02 16:23 GMT+04:00 LRN : > On 6/2/2017 2:47 PM, bob by wrote: > > Can somebody here write a replacement for the standard cout, that will be > > able to print strings and integers, and internally will just redirect to > > puts and itoa? I'm only starting with C++,

Re: [Mingw-w64-public] C++ cout executable size

2017-06-02 Thread bob by
2017-06-02 16:05 GMT+04:00 JonY : > On 06/02/2017 11:47 AM, bob by wrote: > > Wonder why including bloats my exe file so much (extra 900 > KiB, > > with statically linked libraries), even if nothing from there is used. > Why > > cout requires so much code. > > &

Re: [Mingw-w64-public] C++ cout executable size

2017-06-02 Thread bob by
Wonder why including bloats my exe file so much (extra 900 KiB, with statically linked libraries), even if nothing from there is used. Why cout requires so much code. I downloaded gcc-6.3.0 source code, and found libstdc++-v3\src\c++11 folder. I guess the "cout <<" is somewhere in here, but I'm n

Re: [Mingw-w64-public] C++ cout executable size

2017-06-01 Thread bob by
> How huge is "weirdly huge"? Does your executable depend on any MinGWDLLs, like libstdc++-6.dll? I linked all libraries statically, before that it depended on libgcc_s_dw2-1.dll and libwinpthread-1.dll, and probably something else too. It was around 500 KiB originally, now it is almost 1000 KiB.

[Mingw-w64-public] C++ cout executable size

2017-06-01 Thread bob by
Hello. Wrote my hello world in C++, but executable size is weirdly huge. Can I get a lightweight replacement for the cout << operator? People recommend to just use printf instead, but maybe there is a way. By the way, where can I get source code of std? I'd like to see how it works in debugger. -