If I am using include files in my program and there are procedures in the includes that I am not using do they still get built into the program?
Will it add extra size to it?
Thanks
Build Question?
Build Question?
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: Build Question?
If there is no mutual reference, unused procedures are not compiled.
Code: Select all
Procedure foo1() ; compiled because referenced into foo2()
ProcedureReturn 1
EndProcedure
Procedure foo2() ; Not compiled because not called
ProcedureReturn foo1()
EndProcedure
Procedure foo3() ; Compiled because called from main scope
ProcedureReturn 3
EndProcedure
a = foo3()
Debug a
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Build Question?
But be aware that some data and commands inside uncalled procedures are still compiled into the exe. Observe:mk-soft wrote:If there is no mutual reference, unused procedures are not compiled.
Code: Select all
Procedure ThisProcedureIsNeverCalled()
a$="but this text is compiled into the final exe regardless"
UseJPEGImageDecoder() ; And this adds 111 KB to the exe size.
EndProcedure
MessageRequester("test","test")
Re: Build Question?
Sorry but what do you mean by pre-compiler or how to use it?
Thanks
Thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: Build Question?
I mean there are tools (available from this forum) that strip out dead or unused procedures so you can create your exes with less bloat.
Here's a link to one: http://www.purebasic.fr/english/viewtop ... 05#p434105
And you can search these forums for "unused procedures" for more discussion.
Here's a link to one: http://www.purebasic.fr/english/viewtop ... 05#p434105
And you can search these forums for "unused procedures" for more discussion.