May 21, 2024, 03:24:11 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


The Build menu

Started by Bill-Bo, October 03, 2014, 08:02:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bill-Bo

LarryMc,

I'm running IWBasic 2.515b. If I write a program,
or load a program, and then click on the 'Build'
menu, only 'Build Single' and 'Debug' letters are
black and can be clicked. All the other items are
grayed and do not do anything.

Now, when you click 'Build Single', you go through
steps to compile the program. I sure seems to me
it would make more sense to be able to click
'Compile' or 'Compile and Run' to do this. Plus, why
can't you 'Run' the program before you compile it?
Sorry, I had a brain-fart. IWBasic is not an interpreter.

Why is there a 'Build Single?' It leads one to think
there may be a 'Build Double' or 'Build Triple.' Plus,
after you gone through the process of a 'Build Single,'
you are now able to 'Run' or 'Compile and Run,' but
you cannot 'Compile.' It is grayed out.

I know it seems I rambling, but I'm just curious.

I hope you will not think me stupid, or wasting your
valuable time.

Thanks,

Bill

LarryMc

Let me say this first:
When you have a single file application you can create a exe.
You also can take that same single file, create a project and add that one to the project and create an exe.
Once you create a project you can split your program up into as many source files as you want and create an exe.

So, there are single file applications and there are multiple file applications(projects).

The following describes the Build menu options:

Run
Executes the exe file for the current project, if it exists. If there is no current project then the current single file application exe file will be executed, if it exists. Disabled if there is no current exe file.  This option has a corresponding Main ToolBar button.

Compile
Compiles the currently selected  source file of the current project. Disabled if there is  no current project. This option has a corresponding Main ToolBar button that works for both projects and single file applications. Note: The  compile button compiles all source files and the resource file for projects.

Compile and Run
Compiles the current project and, if successful, executes the resulting exe file.  If there is  no current project but is a current Single File application  then the current single file app is compiled and, if successful, executes the resulting exe file..  This option has a corresponding Main ToolBar button that works for both projects and single file applications.

Compile Resource
Compiles the current project's resource file. This option has a corresponding Main ToolBar button.  Disabled if there is  no current project.

Rebuild All
Compiles all of the source files of the current project.  If successful the project is then relinked into an executable.  Disabled if there is  no current project.

Relink All
Relinks all of the files of the current project into an executable.  Disabled if there is  no current project.

Build Single
Compiles the currently selected  source file. Disabled if there is a current project.

Debug
Opens a Debug sub-menu. Currently not fully functional and will probably cause a crash

If I'm reading your question correctly you are telling me everything is working as designed.
If, after reading the above, you think there is still a flaw or that I'm misunderstanding you then ask me again.

BTW, the above menu option descriptions are a partial extract of the IDE Interface=>Main Menu section of the 2.5 beta help file. Also, the Build Menu is very close to what it was back in the EBasic days.

Since I used mostly projects for what I do I use Compile, Relink All, and Run (in that order) what seems like a zillion times a day sometimes.
Here's how it goes.
I have a multifile project.
1st I compile the entire project which gives me an obj file for each source file. Then I link all the objs to create the exe.
The main thing is that I have all the obj files.
2nd I edit one of the source files.
Instead of having to recompile everything I use Compile to compile the source file I just edited. I then use Relink All to link  the obj I just created with all the ones I created in step 1 to create the exe.

You can't imagine how long it takes to recompile and relink the 40+ files used to create IWB2.5 beta when you only made a single character change to one of the files.

It is so beneficial to me that I will probably add a new option to the Build menu.
I'll combine Compile, Relink All, and Run into one option and call it CLRun

Anyway, hope that helps you out.  If not, hit me again.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Bill-Bo

LarryMc,

Your very detailed reply is much appreciated.

I have not gotten into projects yet. Just been dealing
with single files, so far.

I'll do some help file reading and try to get caught up.

Thanks, Again,

Bill