Oberon Community Platform Forum
September 25, 2017, 08:54:07 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Some Newbie questions....  (Read 3951 times)
Cleverson
Newbie
*
Posts: 5


« on: July 27, 2009, 08:31:11 PM »

Hello:

At the Zonnon compiler download page, it's stated that one may use ZonnonBuilder instead of Visual Studio. I don't have VS installed on my Windows XP, so I downloaded and installed Zonnon compiler plus builder for VS 2005. When I try to compile that GUI Hello program example found in the getting started document, either using the builder or the command line compiler, it gives me several errors. It seems that it cannot find any Windows API related definition module. Must I have any SDK installed? I have already .net 2.0.

Also, I'd like to know how to generate .exe binaries using the command line compiler, since I compiled the Hello program example and it generated a DLL.

Thank you all for any help

Cleverson
Logged
leledumbo
Jr. Member
**
Posts: 96



WWW
« Reply #1 on: July 28, 2009, 04:45:54 AM »

Quote
Must I have any SDK installed? I have already .net 2.0
Depending compiler version, you might need to read this.
Logged
Cleverson
Newbie
*
Posts: 5


« Reply #2 on: July 28, 2009, 02:12:08 PM »

Thanks, but I grabbed actually Zonnon.Setup_1.0.89.zip, have forgotten to mention it.
Logged
Cleverson
Newbie
*
Posts: 5


« Reply #3 on: August 13, 2009, 01:42:26 AM »

I updated my Windows XP to .Net 3.5 and installed Zonnon.Setup_1.2.2.zip. Then, I tried compiling the code that ships in the Getting Started document, using the Zonnon Command line Compiler. The code is as follows:

module Main;
import System, System.Windows.Forms as Forms;

type {public, ref} MainForm = object implements Forms.Form
var {public}
   jumpButton : Forms.Button;

procedure {public} onClick(sender: object; args: System.EventArgs);
begin
   if jumpButton.Dock = Forms.DockStyle.Bottom then
      jumpButton.Dock := Forms.DockStyle.Top;      
      jumpButton.Text := "Oops";
   else
      jumpButton.Dock := Forms.DockStyle.Bottom;      
      jumpButton.Text := "Jump";
   end
end onClick;

begin
   Text := "My Zonnon Windows Application";
   Width  := 320;
   Height := 200;

   jumpButton := new Forms.Button;
   jumpButton.Text := "Jump";
   jumpButton.Dock := Forms.DockStyle.Bottom;      
   jumpButton.add_Click(onClick);
   Controls.Add(jumpButton);   
   CenterToScreen;
end MainForm;


var mainForm: MainForm;
begin
   mainForm := new MainForm;    
   Forms.Application.Run(mainForm);
end Main.

I receive the following messages:

2019: e:\helloG.znn(2,40): Cannot import 'Zonnon.System.Windows.Forms'. If it is an external name check if you have referenced the library
2017: e:\helloG.znn(4,55): Name 'Form' does not denote a definition as expected
2019: e:\helloG.znn(4,55): Cannot import 'Zonnon.System.Windows.Forms.Form'. If it is an external name check if you have referenced the library
2021: e:\helloG.znn(6,21): Name 'Button' does not denote a type as expected.
2036: e:\helloG.znn(10,46): Entity 'Forms' is not declared
2036: e:\helloG.znn(20,2): Entity 'Text' is not declared
2036: e:\helloG.znn(21,2): Entity 'Width' is not declared
2036: e:\helloG.znn(22,2): Entity 'Height' is not declared
2038: e:\helloG.znn(24,16): Neither type nor type name is given in Forms.Button.
2036: e:\helloG.znn(28,14): Entity 'Controls' is not declared
2036: e:\helloG.znn(29,2): Entity 'CenterToScreen' is not declared
2038: e:\helloG.znn(24,16): Neither type nor type name is given in Forms.Button.
2117: e:\helloG.znn(20,2): Illegal type of the left part of the assignment statement
2117: e:\helloG.znn(21,2): Illegal type of the left part of the assignment statement
2117: e:\helloG.znn(22,2): Illegal type of the left part of the assignment statement
2038: e:\helloG.znn(24,16): Neither type nor type name is given in Forms.Button.
2038: e:\helloG.znn(24,16): Neither type nor type name is given in Forms.Button.
2117: e:\helloG.znn(24,2): Illegal type of the left part of the assignment statement
2117: e:\helloG.znn(25,2): Illegal type of the left part of the assignment statement
2117: e:\helloG.znn(26,2): Illegal type of the left part of the assignment statement
2024: e:\helloG.znn(38,1): Procedure '#no name' is not declared in definition ''
2024: e:\helloG.znn(38,1): Procedure '#no name' is not declared in definition ''
2024: e:\helloG.znn(38,1): Procedure 'CenterToScreen' is not declared in definition ''
2024: e:\helloG.znn(38,1): Procedure '#no name' is not declared in definition ''

Thanks for any help

Cleverson
Logged
fnecati
Jr. Member
**
Posts: 60


« Reply #4 on: August 15, 2009, 03:06:44 PM »

What about with the one of these commands ?

zc /ref:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /entry:Main /out:formtest.exe helloG.znn
zc /ref:System.Windows.Forms.dll /entry:Main helloG.znn
zc /ref:System.Windows.Forms.dll /entry:Main /out:formtest.exe helloG.znn

Look at
> zc /help
for details.

Logged
Cleverson
Newbie
*
Posts: 5


« Reply #5 on: August 15, 2009, 03:52:39 PM »

What about with the one of these commands ?

zc /ref:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /entry:Main /out:formtest.exe helloG.znn
zc /ref:System.Windows.Forms.dll /entry:Main helloG.znn
zc /ref:System.Windows.Forms.dll /entry:Main /out:formtest.exe helloG.znn
Many thanks! It worked.

When I run it without /entry:Main, it generates a .DLL library. When I run with /entry:Main, it generates a .EXE executable. I think there should be a more explanatory documentation on these details, but it's OK for me now.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!