mIRC Home    About    Download    Register    News    Help

Print Thread
#140196 23/01/06 12:35 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
i know this can be done, but couldnt seem to find any options to do with it, when i build my dll, it appears in the folder 'Debug', and its over 200kb in size

theres a way i can put it as 'Release' format which shrinks it to something like 20kb, any of you guys know how to do this?

#140197 23/01/06 12:36 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Compiler?

#140198 23/01/06 12:53 AM
Joined: Feb 2004
Posts: 206
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Feb 2004
Posts: 206
Umm, I know this may sound obvious - but perhaps you should compile it in production mode, not debug mode. Sounds like you might do well to search for a tutorial on Visual Studio/C++ as these problems are generic [V]C++ programming issues (lessons to be learnt by novice programmers) rather than issues relating to mIRC scripting.

Cheers,

DK.


Darwin_Koala

Junior Brat, In-no-cent(r)(tm) and original source of DK-itis!
#140199 23/01/06 01:10 AM
Joined: Jan 2003
Posts: 249
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
Debug is for testing purposes and the compiler includes many more tracking things

Go in the build menu and choose configuration manager and set the build to Release for a release version which will be around 80 KB in size before compiler optimizations.

Then look at this page http://www.catch22.net/tuts/minexe.asp which also contains other useful Win32 tutorials.

#140200 23/01/06 01:15 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks guys!

#140201 23/01/06 01:24 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
and also guys, is there any option i can use to optimise the dll for small code?

#140202 23/01/06 01:57 AM
Joined: Jan 2003
Posts: 249
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
Look at the tutorial boy!

#140203 23/01/06 02:36 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
ok i put this in

#pragma optimize("Os", on)

and dll size is still 32kb, did you use this in your dcx dll david?

#140204 23/01/06 11:50 AM
Joined: Jan 2003
Posts: 249
C
Fjord artisan
Offline
Fjord artisan
C
Joined: Jan 2003
Posts: 249
read the whole tutorial, there is not only one optimization to be used, but many of which some I did not use, like replacing the heap stuff, and the libc.

You can configure these options in the menu project - settings dialog in the C/C++ and Link parts where all these things are displayed for most of them (I assume you are on VC++ 6 from the source you gave me).

Last edited by ClickHeRe; 23/01/06 11:52 AM.
#140205 25/01/06 02:42 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
#pragma check_stack(off)
#pragma comment(linker,"/OPT:NOWIN98")
#define WIN32_LEAN_AND_MEAN


NaquadaBomb
www.mirc-dll.com
#140206 25/01/06 03:47 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks for the reply mate, the dll is oddly 80kb lol

still the same after i put those header things in :S

i think it might be the way i made the project cos it has a stdafx.cpp in it too

and it also has

#include "stdafx.h"
#include "pcrt32.h"

which if i comment out, stops it compiling properly. i think i should make an empty dll project and start from scratch?

Last edited by pouncer; 25/01/06 03:49 PM.

Link Copied to Clipboard