How do you build the QCDApe.dll plugin with a size of ~150KB and not ~202KB ? [Archive] - Quintessential Forum

PDA

View Full Version : How do you build the QCDApe.dll plugin with a size of ~150KB and not ~202KB ?


Deicide
05-10-2004, 10:55 PM
How do you correctly compile a Release version of the QCD Monkey's Audio input plugin ?

Everytime I compile the sources (with MACLib3.99) I end up with QCDApe.dll being ~202KB, which is considerably larger than ~150KB for the one released by Quinnware.

I am using Visual C++ 6.0 SP5, and I have selected "Release" as the configuration. I have tried building MACLib separately, but I still get the same results.

I can only think it's using a Debug build of MACLib instead of the Release version.

Any ideas how to produce a ~150KB QCDApe.dll ?

Tokelil
05-11-2004, 12:47 AM
I know this isn't the answer you were looking for, but I downloaded the source and compiled it in release mode and it is 141 KB... Some compiler as you, but without SP5. (Forgot to install on my fresh install of WinXP) I'll try installing SP5 and see if that is what makes the difference.

Edit: No, didn't make a difference. Still at 141 KB.

Deicide
05-12-2004, 07:12 AM
It's weird that your's is 141KB. The official one released by Quinnware is 153KB.

Something odd is going on!

After downloading the Plugin SDK and Monkey's Audio
plugin again and re-installing, my release version
of QCDApe.dll is still 202KB.

After building, the MACLib.lib file in the Release
folder is 296KB. How big is yours ? (I'm talking about MACLib.lib:)

I attach my build log (QCDApe.doc) in case that helps.

Any ideas ?

PS. Why aren't you allowed to upload .htm, or .plg files ? That's the standard build log format produced by VC++.

Tokelil
05-12-2004, 10:15 AM
My MacLib is 258KB... Weird! I'll try to build it on my other pc in a few hours and see what happens.

Tokelil
05-12-2004, 11:23 AM
Now this is getting weird. (At least for me, but I know very little about compilers)

Downloaded the Ape source to my notebool, copied the 3 missing .h files to the sup_QCDApeSrc dir, changed to QCDApe release and ran rebuild all.

MACLib.lib is still 258KB but the .dll is now 153KB.

Edit: Looking at the compiler reports I cant see any differences in compiler options etc.

Deicide
05-12-2004, 01:18 PM
That's exactly what I'm doing to build mine. Hmmm...

Gonna try a clean install of XP with clean install of VC++ 6 and SP5

Let you know how I get on.

Deicide
05-18-2004, 06:49 PM
After a clean install of Win XP and VC++ SP5, QCDApe.dll is still 202KB for a Release build:o(

This is annoying because I want to modify the plugin to add some extra functionality.

Any more ideas anyone ?

acozz
05-18-2004, 07:38 PM
Perhaps you have the compiler optimizing for speed (which I believe is the default) but Paul optimized for file size? Just a guess.

Deicide
05-18-2004, 10:46 PM
Thanks acozz. Got it down to 179KB after optimizing for size, so we're on the right track. Tried a few other optimization settings as well, but it stayed at 179KB.

I thought all the compiler settings were stored in the .dsp project file, and so by using his project file, would be compiling with the same settings as Paul. Obviously not ? ....or maybe he's using Borland C++ ? From what I remember, it tended to produce better/smaller code.

Do you know why he optimizes for size over speed ?

Time to get the compiler manual out...

Paul
05-18-2004, 10:50 PM
I always optimize for speed. Here are my devstudio options for QCDApe.dll.

Compile options:
/nologo /MT /W3 /GX /O2 /I "../common" /I "maclib" /I "shared" /D "WIN32"
/D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "QCDAPE_EXPORTS"
/Fp"../Output/QCDApe/Release/QCDApe.pch" /YX /Fo"../Output/QCDApe/Release/"
/Fd"../Output/QCDApe/Release/" /FD /c

Link options:
kernel32.lib user32.lib /nologo /dll /incremental:no /pdb:"../Output/QCDApe/Release/QCDApe.pdb"
/machine:I386 /out:"../installrelease/plugins/QCDApe.dll"
/implib:"../Output/QCDApe/Release/QCDApe.lib" /OPT:NOWIN98

Deicide
05-19-2004, 06:33 PM
These were the settings that come with the QCDApe plugin project. When I use them QCDApe.dll ends up as 202KB. Managed to get hold of another PC, so after a fresh installation I'll try building it on that and see if it's just my machine that's playing up.

Deicide
05-22-2004, 12:30 AM
No luck with the new machine. Exactly the same happens. Here's exactly what I did:

1) Downloaded the latest v1.40 sources for QCDApe Input plugin (ie. sup_QCDApeSrc.zip) and the latest plugin development kit.
2) Created folder called sup_QCDApeSrc and copied contents of sup_QCDApeSrc.zip to it.files to the
3) Copied the 3 missing .h files from the PDK to the QCDApeSrc folder.
4) Double-clicked on QCDApe.dsw to start up VC6++ with the QCDApe project loaded.
5) Set "Build->Set Active Configuration..." to "QCDApe - Win32 Release"
6) Select "Build->Rebuild All"

A 202KB QCDApe.dll file is placed in the "installrelease->plugins" folder.

MACLib.lib is 296KB

This has really got me flummoxed.

Has anybody else experienced the same problem of not being able to produce a 153KB QCDApe.dll ? I can't be the only one.... can I ?

Deicide
06-13-2004, 04:33 PM
The size difference might have something to do with VC Service Packs, since I get different sizes when I build without SP5 installed, compared to when I have SP% installed.

Deicide
06-17-2004, 07:23 PM
Bingo! If you change the project settings so that it uses the Multithreaded DLL run-time library, instead of the Multithreaded run-time library, I can get a release build dll which is 151KB in size. While this is still not the 153KB dll produced by Paul, I can only assume he is compiling with VC++7 and not VC++6 .

BTW Paul what compiler do you use ?

acozz
06-17-2004, 07:40 PM
Those workspaces/projects are for VC++6.0.

.NET uses solutions.

Deicide
06-17-2004, 07:49 PM
Hmmmmm..., It seems odd that he (and others) can get a 153KB dll using the multi-threaded run-time library, but I can only get a dll of comparable size (151KB) by using the multi-threaded DLL run-time library.

Anyway, I'm happy now and can add a few extra features (Normalize on playback, Gapless playback through WaveOut) to the Monkey's Audio plugin.

acozz
06-17-2004, 09:45 PM
Hmmmmm..., It seems odd that he (and others) can get a 153KB dll using the multi-threaded run-time library, but I can only get a dll of comparable size (151KB) by using the multi-threaded DLL run-time library.

Anyway, I'm happy now and can add a few extra features (Normalize on playback, Gapless playback through WaveOut) to the Monkey's Audio plugin.

Well, since this is VC++6.0, I don't think it's a problem that you use the dll since it comes with Windows, I believe. I know the .net dll's don't come with windows, which is a pain.

Deicide
06-18-2004, 02:40 AM
I didn't realise the multithreaded DLL option causes the compiler to create references to the standard libraries instead of statically linking to them.

As you say, this shouldn't be a problem, but I've gone from being happy to being unhappy again:o(

Aaaaaargh... Why can't I create a 153KB QCDApe.dll release DLL?!!!!!!!!!

I'm off to throw myself under a train............................

Deicide
01-06-2005, 06:19 PM
I still haven't managed to build a 153K QCDApe.dll plugin. However, I was reading through the docs for the compiler and linker and noticed that some foptimization features aren't available with the Standard edition of VC++6. Can anyone get a 153K dll when it's compiled with VC++6 Standard ?

or are you all using VC++6 Professional ?

Tokelil
01-06-2005, 07:48 PM
The license I have is a students license. Not sure what version of VC++ 6.0 that gives...

acozz
01-07-2005, 03:42 AM
I just builed the QCDApe source with Visual C++ 6.0 Professional and got a 153KB dll file. So I think you have your answer.

Deicide
01-07-2005, 04:22 PM
Finally :evolved: :)

I didn't realise the standard edition produced such bad/bloated code. Time to upgrade to Professional!

Deicide
01-08-2005, 05:48 AM
I was reading an article about the differences between Visual C++ 6 and VC++ 7, which said the optimization had been greatly improved in VC++ 7 allowing the whole project to be taken into consideration, instead of just the current module (as is the case with VC++ 6).

Because of this, can someone please compile the QCDApe.dll plugin with VC++ 7 and report back here with the size of QCDApe.dll that is produced.

Tropics
01-09-2005, 07:24 PM
i can do this if i find some time ... where can i find the source code?

acozz
01-09-2005, 08:16 PM
http://www.quinnware.com/bin/plugins/input/sup_QCDApeSrc.zip

Tokelil
01-09-2005, 08:17 PM
You can get it from the support link:
http://www.quinnware.com/list_plugins.php?plugin=40

Tropics
01-10-2005, 12:58 AM
146K. didn't change any settings, so it's still release multithreaded, speed optimized. some other flags like "global optimization" might make it even smaller.

but ... why do you care about such a small size difference anyway? not saying size is not important of course ;)

it's visual studio 7.1 actually.

Deicide
01-10-2005, 04:18 PM
Thanks for doing that Tropics.

No need for me to purchase the Professional version though - the latest version of the VC++ Pro compiler is available for free from the Microsoft website (Visual C++ 2003 toolkit). After installing it, I just copied all files from the bin folder and the lib folder to the bin and lib folders in the Standard installation, and now I can compile QCDApe.dll with a size of 146K:)

I'm a happy bunny now. Maybe I can get back to improving the QCDApe.dll plugin.

EDIT: You also need to copy all the files/folders in the include folder to the corresponding include folder in the VC++ 6 folder.