arguments to co2.exe

Started by Pierre Bellisle, October 28, 2022, 07:37:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pierre Bellisle

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


  •  

Roland Stowasser

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
  •  

Pierre Bellisle

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.
  •  

Charles Pegge

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.

Pierre Bellisle

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


  •  

Charles Pegge

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.

Pierre Bellisle

Great !
Many thanks Charles...   ~:-]
  •  

Pierre Bellisle

Just tested 50P13,
FullFileName works fine, MessageBox no more.

Thanks...
  •  

Pierre Bellisle

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

  •  

Charles Pegge

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?

Pierre Bellisle

Charles,

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

Regard, Pierre
  •