PlanetSquires Forums

Support Forums => General Board => Topic started by: Jim Dunn on May 12, 2022, 03:51:52 AM

Title: How To Streamline FreeBasic Executables
Post by: Jim Dunn on May 12, 2022, 03:51:52 AM
Hey all, remember when Bob Zale came out with that fancy "only compile into your EXE the parts of the include files that are needed" and it would ignore the rest?

I'm trying to figure out how to do that with FreeBasic.

I created a library (.a) but all my EXE files were the same size, no matter if I called a function or not.

Everything appears to be a static compile, putting everything into the EXE.

Any ideas ???
Title: Re: How To Streamline FreeBasic Executables
Post by: José Roca on May 12, 2022, 04:03:11 PM
Take a look to my include files in the Afx framework and my use of PRIVATE in each procedure. Be warned that only works using source code.
Title: Re: How To Streamline FreeBasic Executables
Post by: Johan Klassen on May 12, 2022, 08:52:19 PM
also, if you split your library into separate files one function per file and compile each as an object and create the library from them the linker should then only link-in the used functions
Title: Re: How To Streamline FreeBasic Executables
Post by: Jim Dunn on May 15, 2022, 07:03:31 AM
Thank you both -- I see that my "knowledge of PRIVATE" was NULL...

So, while I "AM STUDYING ABOUT PRIVATE"... I went ahead and separated all my functions out into separate files and learned how to create a libjLib.a file.

Thx again!!