"Compiler options" ignored w/ "Create executable"

Everything else that doesn't fall into one of the other PB categories.
Captn. Jinguji
User
User
Posts: 92
Joined: Sun Oct 24, 2004 9:25 am

"Compiler options" ignored w/ "Create executable"

Post by Captn. Jinguji »

Somewhat unexpectedly (for me), a main source file name entered under "Compiler Options" in an included file
seems to get ignored when "Create executable" is selected, just the included source is being compiled to a not-so-useful exe.

When compile/run is issued from the IDE, the main file is being taken into account.

I could well understand that the main file usually will not be heeded when compile-to-exe of the included file was issued from the command line interface, but the ide has all that it needs to know to perform an "all-inclusive compile", no ?

Could the behaviour observed be a feature, and if so, what good is it ?

I am using 4.40p.
Is this an artifact or should it be disposed of ?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6161
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: "Compiler options" ignored w/ "Create executable"

Post by blueznl »

I've been reading this three times and I do not understand the question, could you please rephrase it?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
freak
PureBasic Team
PureBasic Team
Posts: 5929
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: "Compiler options" ignored w/ "Create executable"

Post by freak »

This is by design. The mainfile option is intended to be used while you work on the code (and compile/run often). Since the "Create Executable" is used less frequently the option does not apply there.

Btw, its better to create a project now instead of using this option.
quidquid Latine dictum sit altum videtur
Captn. Jinguji
User
User
Posts: 92
Joined: Sun Oct 24, 2004 9:25 am

Re: "Compiler options" ignored w/ "Create executable"

Post by Captn. Jinguji »

Ah ok, thanks, for clearing that up, Freak.

It indeed used to be a useful option, and I used it on a bunch of sourcefiles created with 4.31,
thus, there was no project there for them, and the help file is a bit - may I say : - vague on the
fact, that it is confined to IDE compile/run.

Given that projects now are included in the IDE, I think this solves the "problem".

It was just irritating to have set the option on an include which actually compiles fine to an exe,
which, then actually did "nothing" when it was executed ;)

BTW: Thanks to Bluenzl also for trying... ;)
Is this an artifact or should it be disposed of ?
Post Reply