Jose's Read Only Forum 2023

IT-Consultant: Charles Pegge => OxygenBasic => Topic started by: Pierre Bellisle on October 28, 2022, 07:37:44 AM

Title: arguments to co2.exe
Post by: Pierre Bellisle on October 28, 2022, 07:37:44 AM
Hey Charles!

A question for you if you have a minute or two to spare...

My Precompiler send the following:
D:\Dev\Oxygen\o2\co2.exe -32-m "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.o2bas" "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.exe" "D:\Dev\Oxygen\o2\~code\Default.res"

I got a O2H messahebox saying [File not found: default.res] but co2.txt say [Okay].

If I copy [default.res] in [D:\Dev\Oxygen\o2\demos\WinDynDialogs\] then all goes well.

Q1) Is it normal to have a messagebox with the [-m] switch ?
Q2) For a .res resource file, is it mandatory to have it in the .02bas folder ? 

Thank you,
Pierre


Title: Re: arguments to co2.exe
Post by: Roland Stowasser on October 28, 2022, 11:01:55 AM
Hi Pierre,

in WinDynDialog's input box, I started a command window:
cmd

In the cmd window I entered (for my system) this command:
d:\OxygenBasic\co2.exe TabControl.o2bas
This opens the app in jit mode.

these commands at the prompt:

D:\OxygenBasic\demos\WinDynDialogs>d:\OxygenBasic\co2.exe -32 -m TabControl.o2bas TabControl.exe

D:\OxygenBasic\demos\WinDynDialogs>
Okay
D:\OxygenBasic\demos\WinDynDialogs>tabcontrol.exe

will create the exe file and it then can be started.

There is no .res file in this folder directly. It must first be created from a rc file.

Roland
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on October 29, 2022, 02:21:09 AM
Hi Roland.

In fact, I have no problem compiling with or without a resource file.
My problem is more when a resource is not in the .o2bas folder.
You can see my command line above...
I'm not sure about Charles intention on Q1 and Q2...

Thank you for your interest.
Title: Re: arguments to co2.exe
Post by: Charles Pegge on October 31, 2022, 07:28:01 AM
Hi Pierre,

The -m switch should switch off the message box

The directory-path for res files currently gets stripped off the file-name. I will fix that on the next release.
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on November 02, 2022, 07:23:36 AM
Hi Charles,

Many thanks for the future stripped path adjustement.

For the -m switch, I did put the exact same text from my precompiler as seen above to a .bat file and I still have an o2 message box.
Try this...

Test.bat

D:\Dev\Oxygen\o2\co2.exe -32-m "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.o2bas" "D:\Dev\Oxygen\o2\demos\WinDynDialogs\TabControl.exe" "D:\Dev\Oxygen\o2\~code\~~~Resource.res"

pause


Title: Re: arguments to co2.exe
Post by: Charles Pegge on November 02, 2022, 12:59:52 PM
Yes, I see that this error message is emitted directly from reso.inc, instead of being added to the error buffer.

It will be fixed on the next update.
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on November 02, 2022, 08:54:41 PM
Great !
Many thanks Charles...   ~:-]
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on November 05, 2022, 02:21:00 AM
Just tested 50P13,
FullFileName works fine, MessageBox no more.

Thanks...
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on December 30, 2022, 07:11:18 AM
Hi Charles,
I found another error o2 message box while using the -m silent switch.

It came when I did a typo, see next line... 
function DlgProc( sys hDlg, uint uMsg, sys wParam, lParam ) as Typo CALLBACK

Note also the negative column number.

Regard,
Pierre

Title: Re: arguments to co2.exe
Post by: Charles Pegge on December 30, 2022, 10:11:23 AM
Hi Pierre,

I found the -m switch worked okay with this error: the message was routed to the console. Perhaps something wrong in the command line?
Title: Re: arguments to co2.exe
Post by: Pierre Bellisle on December 31, 2022, 03:52:22 AM
Charles,

Very sorry about this, you are right!
I had a bug in my precompiler and did not test enough.

Regard, Pierre