Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.xharbour

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-01-2008, 05:07 AM
Donald Leask
Guest
 
Posts: n/a
Default Compile & Link S87 Code

Hi All

How do I create the exe I need from numerous .prg files with xHarbour? I
have looked at the GUI and don't see anything obvious(to me ;-)).

Thanks.

--
Donald Leask
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 12-01-2008, 09:56 AM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

Donald,

In case you are testing the xBuilderW demo - regardless of what Clipper
version has generated the .prg files - let's say you have a project
directory C:\test\ptj and a.prg contains the "main" function (in general
it's better for everybody to include all sources in functions), respectively
b.prg and c.prg contain additional functions:
- on the first page of the wizard complete the project path and a as target
- on the third page of the wizard press the Add button and do a multiple
selection of b.prg and c.prg and then press Open
- repeat the adding operation as many times as you need

In place of using the Add button you can simply open the folder with your
sources and "drag and drop" each source file on the surface of the "prg' tab
of the third page of the wizard

Ella




"Donald Leask" <donald@softdown.net> wrote in message
news:Xns9B6752A47F9FAdonaldsoftdownnet@196.43.3.60 ...
> Hi All
>
> How do I create the exe I need from numerous .prg files with xHarbour? I
> have looked at the GUI and don't see anything obvious(to me ;-)).
>
> Thanks.
>
> --
> Donald Leask




Reply With Quote
  #3 (permalink)  
Old 12-01-2008, 01:34 PM
Donald Leask
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

> In case you are testing the xBuilderW demo - regardless of what
> Clipper version has generated the .prg files - let's say you have a
> project directory C:\test\ptj and a.prg contains the "main" function
> (in general it's better for everybody to include all sources in
> functions), respectively b.prg and c.prg contain additional functions:
> - on the first page of the wizard complete the project path and a as
> target - on the third page of the wizard press the Add button and do a
> multiple selection of b.prg and c.prg and then press Open
> - repeat the adding operation as many times as you need




Where do I find the wizard... all I see are four tabs with start page on
the left, then xHarbour Developers Network, Source Editor and Form
Designer... ?



--
Donald Leask
Reply With Quote
  #4 (permalink)  
Old 12-01-2008, 01:46 PM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


>
> Where do I find the wizard... all I see are four tabs with start page on
> the left, then xHarbour Developers Network, Source Editor and Form
> Designer... ?
>


If C:\xHB\ is the installation folder for the demo, then
C:\xHB\bin\xBuildW.exe is the wizard, and you might create an icon for it
on your desktop ( right-click on the .exe file and click on "Send to..." and
"Desktop (create shortcut)".

Ella


Reply With Quote
  #5 (permalink)  
Old 12-02-2008, 08:53 AM
Donald Leask
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

>> Where do I find the wizard... all I see are four tabs with start
>> page on the left, then xHarbour Developers Network, Source Editor and
>> Form Designer... ?
>>

>
> If C:\xHB\ is the installation folder for the demo, then
> C:\xHB\bin\xBuildW.exe is the wizard, and you might create an icon
> for it on your desktop ( right-click on the .exe file and click on
> "Send to..." and "Desktop (create shortcut)".


Got it - thanks...

Is the target name on the first page the executable name?
After an attempted build had a lot of E0001 errors... ?


--
Donald Leask
Reply With Quote
  #6 (permalink)  
Old 12-02-2008, 12:07 PM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


"Donald Leask" <donald@softdown.net> wrote in message
news:Xns9B6878DE68852donaldsoftdownnet@196.43.3.60 ...
>>> Where do I find the wizard... all I see are four tabs with start
>>> page on the left, then xHarbour Developers Network, Source Editor and
>>> Form Designer... ?
>>>

>>
>> If C:\xHB\ is the installation folder for the demo, then
>> C:\xHB\bin\xBuildW.exe is the wizard, and you might create an icon
>> for it on your desktop ( right-click on the .exe file and click on
>> "Send to..." and "Desktop (create shortcut)".

>
> Got it - thanks...
>
> Is the target name on the first page the executable name?


In my example a.prg as root included the Main() procedure.
In case I want the executable to be myapp.exe ( not a.exe ) then on the
first page of the wizard I type in myapp as "target", and on the second page
of the wizard I type in a.prg as "main source file".

> After an attempted build had a lot of E0001 errors... ?
>


Please list here the error messages, different persons might have different
experiences with converting Clipper applications, and it's better chance to
be solved.

Ella


>
> --
> Donald Leask



Reply With Quote
  #7 (permalink)  
Old 12-02-2008, 12:07 PM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


"Donald Leask" <donald@softdown.net> wrote in message
news:Xns9B6878DE68852donaldsoftdownnet@196.43.3.60 ...
>>> Where do I find the wizard... all I see are four tabs with start
>>> page on the left, then xHarbour Developers Network, Source Editor and
>>> Form Designer... ?
>>>

>>
>> If C:\xHB\ is the installation folder for the demo, then
>> C:\xHB\bin\xBuildW.exe is the wizard, and you might create an icon
>> for it on your desktop ( right-click on the .exe file and click on
>> "Send to..." and "Desktop (create shortcut)".

>
> Got it - thanks...
>
> Is the target name on the first page the executable name?


In my example a.prg as root included the Main() procedure.
In case I want the executable to be myapp.exe ( not a.exe ) then on the
first page of the wizard I type in myapp as "target", and on the second page
of the wizard I type in a.prg as "main source file".

> After an attempted build had a lot of E0001 errors... ?
>


Please list here the error messages, different persons might have different
experiences with converting Clipper applications, and it's better chance to
be solved.

Ella


>
> --
> Donald Leask



Reply With Quote
  #8 (permalink)  
Old 12-02-2008, 04:43 PM
Donald Leask
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


>> After an attempted build had a lot of E0001 errors... ?
>>

>
> Please list here the error messages, different persons might have
> different experiences with converting Clipper applications, and it's
> better chance to be solved.
>


E0001: Statement not allowed outside of procedure or function


--
Donald
Reply With Quote
  #9 (permalink)  
Old 12-02-2008, 05:00 PM
dlzc
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

Dear Donald Leask:

On Dec 2, 10:43*am, Donald Leask <don...@softdown.net> wrote:
> >> After an attempted build had a lot of E0001 errors... ?

>
> > Please list here the error messages, different persons
> > might have different experiences with converting Clipper
> > applications, and it's better chance to be solved.

>
> E0001: Statement not allowed outside of procedure or
> function


Ah. The main procedure must be described as either a function or
procedure in (x)Harbour. Clipper let you walk into the first
executable statement without complaint. Just add:
"procedure main"
before the first executable line in the main code. There is a flag I
think you can set to force it to work, but I would not try it.

David A. Smith
Reply With Quote
  #10 (permalink)  
Old 12-02-2008, 05:02 PM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


"Donald Leask" <donald@softdown.net> wrote in message
news:Xns9B68C8A607F46donsoftdownnet@196.43.3.60...
>
>>> After an attempted build had a lot of E0001 errors... ?
>>>

>>
>> Please list here the error messages, different persons might have
>> different experiences with converting Clipper applications, and it's
>> better chance to be solved.
>>

>
> E0001: Statement not allowed outside of procedure or function


Some people have Clipper source code outside a Function or Procedure. In
this case the compiling flags ( see page 46 in the documentation ) need to
be modified accordingly.

Note: in \xHb\doc\ subfolder there is a "Getting Started With xHarbour
Builder.pdf"

Ella

>
>
> --
> Donald



Reply With Quote
  #11 (permalink)  
Old 12-02-2008, 06:56 PM
Donald Leask
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code


>> After an attempted build had a lot of E0001 errors... ?
>>

>
> Please list here the error messages, different persons might have
> different experiences with converting Clipper applications, and it's
> better chance to be solved.


The error message was repeated many times:
E0001: Statement not allowed outside procedure or function


--
Donald
Reply With Quote
  #12 (permalink)  
Old 12-02-2008, 07:57 PM
Tim Jacob
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

Donald Leask wrote:
>
>>> After an attempted build had a lot of E0001 errors... ?
>>>

>> Please list here the error messages, different persons might have
>> different experiences with converting Clipper applications, and it's
>> better chance to be solved.

>
> The error message was repeated many times:
> E0001: Statement not allowed outside procedure or function
>
>
> --
> Donald


For what it's worth, here is Clipper 5.3's description of the same error
text, although not the same number:

*C2006 Statement not allowed outside procedure or function*

Explanation: You specified a statement other than a FIELD, MEMVAR,
or STATIC before the first PROCEDURE or FUNCTION statement and the
current program (.prg) file was compiled with the /N option.

Action: Remove the erroneous statement or move it inside the
appropriate procedure or function definition. Alternatively,
compile without the /N option to force the compiler to automatically
generate a procedure definition with the same name as the program (.prg)
file
Reply With Quote
  #13 (permalink)  
Old 12-04-2008, 05:33 AM
Donald Leask
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

> *C2006 Statement not allowed outside procedure or function*
>
> Explanation: You specified a statement other than a FIELD, MEMVAR,
> or STATIC before the first PROCEDURE or FUNCTION statement and the
> current program (.prg) file was compiled with the /N option.
>
> Action: Remove the erroneous statement or move it inside the
> appropriate procedure or function definition. Alternatively,
> compile without the /N option to force the compiler to automatically
> generate a procedure definition with the same name as the program (.prg)
> file



How do I do the /N option with xHarbour?


--
Donald Leask
Reply With Quote
  #14 (permalink)  
Old 12-04-2008, 10:57 AM
Ella Stern
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

On the 4'th page of the wizard there is a "Flags" field containing <default>
<default> means that compiler flags -n -w are applied.

Please do a test:: in place of
<default>
type in just
-w
before pressing the "Build" button;

this tells the compiler to read in Clipper commands placed before the first
Function or Procedure declaration in the source code.

Ella

"Donald Leask" <donald@softdown.net> wrote in message
news:Xns9B68DF273C4C7donsoftdownnet@196.43.3.60...
>
>>> After an attempted build had a lot of E0001 errors... ?
>>>

>>
>> Please list here the error messages, different persons might have
>> different experiences with converting Clipper applications, and it's
>> better chance to be solved.

>
> The error message was repeated many times:
> E0001: Statement not allowed outside procedure or function
>
>
> --
> Donald



Reply With Quote
  #15 (permalink)  
Old 12-04-2008, 11:08 AM
Tim Jacob
Guest
 
Posts: n/a
Default Re: Compile & Link S87 Code

Donald Leask wrote:
>> *C2006 Statement not allowed outside procedure or function*
>>
>> Explanation: You specified a statement other than a FIELD, MEMVAR,
>> or STATIC before the first PROCEDURE or FUNCTION statement and the
>> current program (.prg) file was compiled with the /N option.
>>
>> Action: Remove the erroneous statement or move it inside the
>> appropriate procedure or function definition. Alternatively,
>> compile without the /N option to force the compiler to automatically
>> generate a procedure definition with the same name as the program (.prg)
>> file

>
>
> How do I do the /N option with xHarbour?
>
>

In XBuilder, go to the 4th button. On the Flags line, if there is a -n
or /n, remove it. If there is nothing there, xBuilder will by default
add -n -w. So try adding "-b -m -w -q", which will leave the -n out.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code vectorization syntax woes (C++ or other?) Jocke P Newsgroup comp.lang.misc 2 04-03-2009 02:31 AM
Re: Include SAS code w/o including SAS code charles.harbour@ACT.ORG Newsgroup comp.soft-sys.sas 0 08-13-2008 11:23 PM
Re: how to code cluster efficiently in SAS Xiao, Steven Newsgroup comp.soft-sys.sas 0 12-07-2007 12:00 PM
SCL Joe (was RE: macro structure) Gregg P. Snell Newsgroup comp.soft-sys.sas 0 06-27-2006 07:59 PM
Re: Compile & Run JCL. Narravula Khanna Newsgroup comp.soft-sys.sas 0 10-22-2004 04:46 PM



All times are GMT. The time now is 03:21 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.