News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Why are my dll's so big?

Started by download123, May 01, 2006, 05:06:30 PM

Previous topic - Next topic

download123

I don't understand it
I build dlls in form of

#include <windows.h>

#ifdef BUILD_DLL
    #define DLL_EXPORT __declspec(dllexport)
#else
    #define DLL_EXPORT
#endif

#include <string>
#include <iostream>
#include <time.h>
using namespace std;

struct rueckgabe
{
      ...
};

extern "C" DLL_EXPORT void PLUGM(std::string bef, rueckgabe *rueck)
{
   //some code... cout ... not much
return;
}

and the dll ist 1,21 Mb...

A friend made dlls with only 300kb .. whats the problem?

sethjackson

Well for one you didn't tell us what compiler you or your friend used....... Maybe you are building the DLL in debug mode (this will make the output much larger).

download123

I use codeblocks with mingw....

(I'll ask my friend what he uses...)

how can i see if its debug mode.. btw. how can i cange it?

thomas

Actually, this is not precisely a Code::Blocks issue.

Nevertheless:
Quote#include <iostream>
That already causes massive bloat, especially when using gcc/MinGW. Don't include iostream if you don't absolutely have to.

Furthermore, you will want to check whether "generate debugging symbols" is turned on, and you may want to use "strip executable".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

download123

Thanks a lot...

What would I do without you all  8)