Author Topic: iostream.dll  (Read 6345 times)

Offline demone

  • Multiple posting newcomer
  • *
  • Posts: 36
iostream.dll
« on: November 22, 2011, 12:22:19 pm »
Is there a way for avoid a little problem?

1) I made a library. Wich has a public interface. The library uses internally in its implementation iostream for logging info to the console. that's ok iostream add 450 KB of size (more if I use debug symbols, but for debugging that's ok).
 
2) I use that library. If I need to print something I have to include iostream again.. and there are further 450KB ! so almost 1 MB of iostream because it was included twice.

I figured out some simple solutions for avoid the problem: one was wrapping iostream.. but this is not a very good idea. Unless i need a simple logger there is a lot of classes to wrap. And doing this loss partially template flexibility. There are lots of libraries wich can use standard input/output so wrapping iostream is totally a bad idea. I want to link the library once and forever. So that users of the library can still include iostream without increasing the size of the executable by 450 KB.

Does iostream.dll already exist? (or something similiar of course).
« Last Edit: November 22, 2011, 12:24:02 pm by demone »
processor: Intel Core 2 Quad.
ram: 4 GB
os: Vista
gfx card: Ati Radeon HD 5570

zabzonk

  • Guest
Re: iostream.dll
« Reply #1 on: November 22, 2011, 12:30:48 pm »
Not Code::Blocks related, I'm afraid. You need to ask questions like this on sites like stackoverflow. or reddit/learnprogramming.

Offline demone

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: iostream.dll
« Reply #2 on: November 22, 2011, 12:52:44 pm »
Isn't there anycompiler options I can set through Code::blocks to avoid that problem? Maybe my question is a little bit clearer now.. Are you sure that c::b can't help in this?
processor: Intel Core 2 Quad.
ram: 4 GB
os: Vista
gfx card: Ati Radeon HD 5570

zabzonk

  • Guest
Re: iostream.dll
« Reply #3 on: November 22, 2011, 01:00:22 pm »
No, there are no compiler options to do this. And even if there were, they would be specific to a specific compiler and platform, and once again off-topic here.  Please ask this in the places I suggested.