Questions about compiling for distribution

Just starting out? Need help? Post your questions and find answers here.
RobertSF
User
User
Posts: 61
Joined: Thu May 03, 2018 4:24 pm

Questions about compiling for distribution

Post by RobertSF »

Usually, you compile with debug information while developing, and then compile without debug information for the final release. How does this work in PureBasic?

In Compiler Options, under Compile/Run, there's a checkbox for Enable Debugger. But I've created executables with that checkbox both checked and unchecked, and the executables are the same size, so I'm thinking that has no effect.
User avatar
skywalk
Addict
Addict
Posts: 4221
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Questions about compiling for distribution

Post by skywalk »

I agree it could be more explicit, but, Compile/Run <> Create Executable.
Compile/Run with debugger enabled is definitely a larger exe.
Create Executable drops or ignores debugger settings.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Questions about compiling for distribution

Post by Dude »

Yep. Creating an executable doesn't include any debug info, so that the exe has both the smallest file size and fastest runtime speed.
RobertSF
User
User
Posts: 61
Joined: Thu May 03, 2018 4:24 pm

Re: Questions about compiling for distribution

Post by RobertSF »

Thanks for the reassurance, everyone! :)
User avatar
chi
Addict
Addict
Posts: 1087
Joined: Sat May 05, 2007 5:31 pm
Location: Austria

Re: Questions about compiling for distribution

Post by chi »

RobertSF wrote:How does this work in PureBasic?
Actually "Compile/Run", "Compile with Debugger" and "Compile without Debugger" creates the .exe/.dll in your local temp directory (%USERPROFILE%\AppData\Local\Temp) or, if checked "Create temporary executable in the source directory", in your source directory.
"Create Executable..." on the other hand, creates the executable always without the Debugger (in the directory you specified), whether the Debugger is enabled or not.

FYI: If you run the executable built with the Debugger enabled from outside the IDE, you'll see the Debug output in a console window...
Et cetera is my worst enemy
RobertSF
User
User
Posts: 61
Joined: Thu May 03, 2018 4:24 pm

Re: Questions about compiling for distribution

Post by RobertSF »

Thanks for the clarification! I didn't want to ask again :oops: but I had wondered where the executable went. I thought it might just compile in memory and then run, but now I know it's in the temp directory.
Post Reply