make Photon hello wount make HELP

see my system info at the end:

paul may:
hi everyone.

Outline:
iv got a Photon makeing app problem and im not sure its just my non
coder status, im no programmer, just trying to hack others code
together so i can get a working Photon RequestText shell command to
compliment Kinner`s RequestFile and RequestChoice he kindly made at my
request (thanks kinners).

please see the full code below and perhaps post a fully working version
with comments back here to help explain and educate myself and others
interested i cant read any web pages any QNX personel might point me to
at this time only email/inn.qnx news, no way to get RTP 6.1 or other
updates eather 8( .

Docs Related Problems:
the thing is though, i cant seem to even get any Photon related code from
the helpviewer to compile never mind run, i also assumed that any and all
(or at least a good proportion of) sample code as supplyed in the library
reference docs would be a simple select/copy/insert into ped, save out as a
sample1.c and make sample1 to see how it looks, however thats not the case
(for me at least), and on several examples i noticed that lots of it had the
#include lines missing and had to be guessed at (hard for beginers like me)
and added back in before any code could be made and the beginnings of
understanding and progress could be made.

A request(1):
im sure it would be appreciated (by me at least, Grin)if there was a full section in the help reference compriseing of tryed/known fully working Photon example code that the beginners could be assured should compile out the box (on that release of RTP at least), also id like to request that a binary/code samples NewsGroup be setup
here (good for people without dayly web access, but have email/news access)
so that any QNX or 3rd partys wishing to help newby`s and even the more
advanced non RTP coders could pass along their fully working/commented
code along to the those interested in learning and making new apps.

or/and a new package to install with working commented user compilable
code and binarys covering all current Photon routines we could learn from.

A clean Install:
at first i thought it might be a problem with my RTP binaryfile and
partition installs as i`v had several versions go bad after
installing/conf lots of apps so i decided to take a new partition and
do a new full RTP-A CD install.

it appears that even after a clean install that no Photon supplyed
examples want to compile, nearly all of them saying
“undefined reference to `PhAttach’” or whatever the Ph*/Pt* command
it was trying to compile at the time.

A mistery to me:
also one thing that seems strange to me is that the code example for
PtFileSelection() in the library reference makes use of proto.h
and `abimport.h as local headers but i assumed they are for internal
Phab use due to proto.h being installed as standard in

find /usr -name proto.h

/usr/lib/perl5/5.6.0/x86pc-nto/CORE/proto.h
/usr/photon/appbuilder/proto.h

and abimport.h not being found in this new full install, BUT was on
the old install somewere in my old Appbuilder dir i seem to remember,
eather way they arnt within the main include dirs so arnt used outside Phab ? and as far as i know, the RequestFile code below should just compile as is or kinners wouldnt have put it up on the web
(long time ago now) is the standard RTP-A install bad in some way so
preventing compileing with make from the shell without some magic potion
and years of C behind you ? (keep reading before you answer that).

searching for abimport in helpviewer shows 8 entrys and only 1 of them
PhMakeTransBitmap says its code for a Phab app, although i couldnt
work out how/were one might place this example code to make Phab compile
this example code or how the heck you make its requested abimport.h and
its not currently explained in any fashion anywere i can find.

1 working Photon APP Mame:
i was begining to think that no Photon based code would work in this
fresh install, but as a last try i thought i`d give a 3rd party coders
app a try and as it happens i had downloaded the Photon MAME binary and
source Phmame-0.37b2.2 that worked perfectly and produced a small Photon
window (and full screen although it didnt cover the shelf so was it
really full screen ?) running several of my working Mame games faster
(and way better GFX)than the windows based mame32 side by side.

Photon RequestFile:
SO will this below RequestFile compile as is on your newly installed
RTP-A and if so why wont it work here ?.

(understand i dont want to use Phab at this time, just a simple shell
make and run some tested/working sample C code to access basic builtin
photon gfx filerequester(s) ?/ textinput/ buttons /windows ect.

fully working and tested RTP code showing any and all current implimented
Photon Gfx calls as seen in many of the Amiga Gfx toolkits (ReqTools has
a greate sample of code and executables you can run to see whats best for
your needs for example) would be a very good thing to get a full idea of
whats currently available and useful to the budding RTP coders out there,
a reasonable request for the RTP developers release package install and
a good way to help educate new users/coders IMO).

and if its something to do with the above proto.h or missing abimport.h
how do i fix it ? #include "photon/appbuilder/proto.h" ? wouldnt work
would it ? as looking at that, it seems to be full of …/whatever link
lines that dont get found.

i would really like to understand whats happening and how one might
get a majority of sample code compiling so as to progress in RTP ?
(remember though im not a coder yet, but i do follow the more tec posts with ease so not total newby windows only user status, im considered
an advanced Amiga user of many years 1986/7) .

make requestfile

cc requestfile.c -o requestfile
/tmp/AAA109354_cc.o: In function main': /tmp/AAA109354_cc.o(.text+0x82): undefined reference to PtInit’
/tmp/AAA109354_cc.o(.text+0x1ff): undefined reference to `PtFileSelection’
cc: /usr/bin/ld error 1
make: *** [requestfile] Error 1

why are there undefined reference`s to PtInit and FileSelection here ?
i tryed adding #include <Ph.h> as they both use that according to
the help viewer docs without any improvement.

Photon requestfile code:

#include <stdio.h>
#include <stdlib.h>
#include <Pt.h>

/* Program usage */
#ifdef __USAGE
%C - Open a file requester and print the selected filename to stdout
%C [-t title] [-p text] [-n text] [-ds] [default_file]

Where:

-t title Set the title of the file requester
-p text Set the contents of the positive button
-n text Set the contents of the negative button
-d Select drawers only
-s Save mode
#endif

int
main( int argc, char *argv[] )
{
PtFileSelectionInfo_t file;

char *default_path;
char *title;
char *positive_choice;
char *negative_choice;
int flags = 0, result = EXIT_FAILURE;

PtArg_t args[ 20 ];
int num_args = 0;

/* getopt */
int c, errflag = 0;

default_path = title = positive_choice = negative_choice = NULL;

/* Stop getopt from printing out any error message */
opterr = 0;

/* Very important */
memset( &file, 0, sizeof( file ) );

if( !PtInit( NULL ) )
{
while( (c = getopt( argc, argv, “t:p:n:ds” ) ) != -1 )
{
switch( c ) {
case ‘t’:
title = optarg;
break;
case ‘p’:
positive_choice = optarg;
break;
case ‘n’:
negative_choice = optarg;
break;

case ‘d’:
flags |= Pt_FSR_NO_SELECT_FILES | Pt_FSR_SELECT_DIRS;
/* Only show directories */
PtSetArg( &args[ num_args++ ], Pt_ARG_FS_FLAGS,
Pt_FS_SHOW_HIDDEN | Pt_FS_SEEK_KEY | Pt_FS_SINGLE_LEVEL | Pt_FS_SHOW_DIRS,
Pt_FS_ALL_FLAGS );
break;

case ‘s’:
flags |= Pt_FSR_CONFIRM_EXISTING;
break;

case ‘?’:
++errflag;
break;
}
}

if( num_args > 0 )
{
file.args = args;
file.num_args = num_args;
}

if( optind < argc )
{
default_path = argv[ optind ];
}

PtFileSelection(
NULL,
NULL,
title,
default_path,
NULL,
positive_choice,
negative_choice,
NULL,
&file,
flags );

if( file.ret == Pt_FSDIALOG_BTN1 )
{
/* Success */
printf( “%s”, file.path );
result = EXIT_SUCCESS;
}
}
return( result );
}


the original reason i wanted to try and use this was that its loosly
based on the amiga requestFile syntax and i have a RequestText written
by an old friend of mine in Amiga E, and it appears it might be easyest
to use that to base a Photon version of RequestText on, perhaps useing a
PtAlert ? or something like it.

eventuly i`d like to have all the future request* shell commands extended
so as to be able to specify an optional coordinate so as to place them
onscreen or indeed any Photon screen wereever the user wishes. perhaps
even have the option to snapshot their current coorinates to an env that
gets saved and loaded automaticly on next startup/reboot so allowing
personal control of this family of apps and encurageing others to do
the same if they wish.

while the amigas ReqTools gfx system seems easyer to code/place graphic requesters ect on screen, im hopeful that you readers can write Photon
code in the same compact and understandable style to help the newbys
wishing to advance the platform.

the above kiners code seems a good start, perhaps theres some more
advances you can enlighten the readers with ?, fully working and
commented code prefered for those of us without a current clue LOL.

just so its clear, i dont want to combine this RequestFile and my
proposed RequestText but create a stand alown RequestText to compliment
these other Request shell commands, and work out/fixing why i cant
compile any Ph/Pt code ofcourse LOL.

the ultmate outcome is to convert many amiga scripts i use dayly
from the shell and SID2 file manager (like Dopus4 but way better IMO)
perhaps useing the worker1.3.3 XPhoton port until a SID2 gets made
for RTP or someone ports worker to native Photon and goes a SID2
layout/extension for it at the same time). so allowing the average
person to create simple gfx frontend`s to many RTP shell commands

rewriting the Amiga shell scripts to work as easy and understandable
on RTP is slow going for me, the best option would be if someone wrote
an Amiga KingCon shell for use on RTP so making any current Amiga shell
script work as is on RTP, that in combination with the Request* set of
apps would make creating quick and easy Gfx frontends a LOT easyer
than it stands today.

an extended amiga style assign command plus a fully working RAD
(Recoverable Ram Disk) that expands and shrinks as you copy to/from
it for RTP would be a great addition many people could make great
use of if only it existed here.

as yet Kinners didnt place the requestChoice source on his webpage
or post it on the newsgroups (better for me as i dont currently have
web access) for general use, partly i beleave because of a few bugs
in the early Photon, but i would like to see it or a rewrite some day
as i might learn a few things along the way and the current binary doesnt
have the useage built in, it does work rather well considering it
was put together very quickly .

heres the fully working Amiga E source to the RequestText i`d like to
have converted to RTP if anyones willing to make and post it back here
(or perhaps in the new Binary list i proposed if someone at QNX
puts it online) for me.

anyone anvanced enough to try converting the open sourced Amiga E to
RTP yet ?, it can be found at any aminet archive if you fancy having
a go, its going to be very hard though as much is in assembly as i
understand it.

still it would be great if we could have a good PROC based language
if not this Amiga E with its masses of open source.


Amiga E RequestText Code:

/* RequestText By Video Nasty Written in Amiga E.
Ive converted my RequestText.rexx to Amiga E seemed quite easy to do
a few things needed modifying a little but its all pretty basic.
*/

MODULE ‘ReqTools’ /* use ReqTools Module */

DEF b[120]:STRING,t[45]:STRING,r

PROC main()
getargs()
IF r=1
IF reqtoolsbase:=OpenLibrary(‘reqtools.library’,37) /* want 37+ /
IF (r:=RtGetStringA(b,121,t,0,0))<>NIL /
stringreq /
WriteF(b) /
send stuff back to cli /
WriteF(’\n’)
ENDIF
CloseLibrary(reqtoolsbase) /
close library */
ELSE
WriteF(‘Failed to open reqtools.library v37+\n’)
ENDIF
ENDIF
ENDPROC

PROC getargs()
DEF myargs:PTR TO LONG,rdargs
myargs:=[0,0]
IF rdargs:=ReadArgs(‘TITLE/A,TEXT/A’,myargs,NIL)
t:=myargs[0]
b:=myargs[1]
r:=1
ELSE
r:=’$VER: RequestText 1.0 (11/01/97)’
WriteF(‘RequestText ? for help\n’)
ENDIF
ENDPROC



some system info:
logged in as root as you can see

uname -a

QNX rtp 6.00 2000/10/17-14:59:25edt x86pc x86

AKA RTP-A
Voodoo3/2000, 128 meg ram, jetway/ali motherboard, K6/2 500 CPU.

env

_=/usr/bin/env
PATH=/sbin:/usr/sbin:/usr/ucb:/usr/bin:/bin:/usr/local/bin:/opt/sbin:
/usr/photon/bin:/usr/photon/appbuilder:/usr/X11R6/bin
ABLPATH=/usr/photon/translations
PHOTON=/dev/photon
SHELL=/bin/sh
PHFONT=/dev/phfont
HOSTNAME=rtp
USER=root
PHTK_PATH=/usr/photon
PROCESSOR=x86
TMPDIR=/tmp
LD_LIBRARY_PATH=:/usr/X11R6/lib:/usr/photon/lib:/usr/photon/dll
PHWM=pwm
HOME=/root
DISPLAY=127.1:0
USER_NAME=/dev/photon
TERM=qansi-m
PHOTON_PATH=/usr/photon
PHOTON2_PATH=/usr/photon
PHSTART=1
FONTSLEUTH=/dev/fontsleuthctrl
LOGNAME=root
SYSNAME=nto


Hmm, after reading some more help viewer text yet again, the only
conclusion i can make without far more helpful text written for the
beginner is that eather this fresh full install is in someway bad or
your just not meant to make test.c and get an executable at the end
of it, if it has any reference to P*.h in it.

from the programmers Guide/introduction
file: hello.c


/*

  • File: hello.c
    */
    #include <Pt.h>

int main( int argc, char *argv[] )
{
PtWidget_t *window;
PtArg_t args[1];

if ((window = PtAppInit(NULL, &argc, argv, 0, NULL))
== NULL)
PtExit(1);

PtSetArg(&args[0], Pt_ARG_TEXT_STRING,
“Press to exit”, 0);
PtCreateWidget(PtButton, window, 1, args);
PtRealizeWidget(window);

PtMainLoop();
return (EXIT_SUCCESS);
}

make hello

cc hello.c -o hello
/tmp/AAA621360_cc.o: In function main': /tmp/AAA621360_cc.o(.text+0x18): undefined reference to PtAppInit’
/tmp/AAA621360_cc.o(.text+0x30): undefined reference to PtExit' /tmp/AAA621360_cc.o(.text+0x6f): undefined reference to PtButton’
/tmp/AAA621360_cc.o(.text+0x75): undefined reference to PtCreateWidget' /tmp/AAA621360_cc.o(.text+0x84): undefined reference to PtRealizeWidget’
/tmp/AAA621360_cc.o(.text+0x8c): undefined reference to `PtMainLoop’
cc: /usr/bin/ld error 1
make: *** [hello] Error 1

Hmmmm, guess im not going to get very far like this, strange that the Photon Mame compiled just fine though, im lost.

Paul May, Manchester, UK,

Hi Paul,

The widgets that you are trying to use need to be linked with the appropriate
libraries and header files, they willl not compile if you place them in ped and run make.
when applications are written with the PhAB application builder - it links
to these libraries and headers. The widgets need to have a framework to be contained in
like a window. Since you are new to programming I suggest that you take
a look at the tutorials within the helpviewer to walk you through some of the basics.

You can find it at /Photon Microgui 2.0/Programmer’s Guide/Tutorials within the helpviewer.

To get a better understanding of how Photon works I suggest you read the chapter in the
helpviewer called /Photon Microgui 2.0/Programmer’s Guide/Introduction section, this
section covers

  • Overview of the Photon architecture
  • Photon Application Builder-PhAB
  • Widget concepts
  • Programming paradigm
  • Photon libraries
  • Building applications with PhAB-an overview
  • Writing applications without PhAB

This should help resolve many of your question.


Regards
Brenda
Paul May <paul@phinixi.com.fake.com> wrote:

see my system info at the end:

paul may:
hi everyone.

Outline:
iv got a Photon makeing app problem and im not sure its just my non
coder status, im no programmer, just trying to hack others code
together so i can get a working Photon RequestText shell command to
compliment Kinner`s RequestFile and RequestChoice he kindly made at my
request (thanks kinners).

please see the full code below and perhaps post a fully working version
with comments back here to help explain and educate myself and others
interested i cant read any web pages any QNX personel might point me to
at this time only email/inn.qnx news, no way to get RTP 6.1 or other
updates eather 8( .

Docs Related Problems:
the thing is though, i cant seem to even get any Photon related code from
the helpviewer to compile never mind run, i also assumed that any and all
(or at least a good proportion of) sample code as supplyed in the library
reference docs would be a simple select/copy/insert into ped, save out as a
sample1.c and make sample1 to see how it looks, however thats not the case
(for me at least), and on several examples i noticed that lots of it had the
#include lines missing and had to be guessed at (hard for beginers like me)
and added back in before any code could be made and the beginnings of
understanding and progress could be made.

A request(1):
im sure it would be appreciated (by me at least, Grin)if there was a full section in the help reference compriseing of tryed/known fully working Photon example code that the beginners could be assured should compile out the box (on that release of RTP at least), also id like to request that a binary/code samples NewsGroup be setup
here (good for people without dayly web access, but have email/news access)
so that any QNX or 3rd partys wishing to help newby`s and even the more
advanced non RTP coders could pass along their fully working/commented
code along to the those interested in learning and making new apps.

or/and a new package to install with working commented user compilable
code and binarys covering all current Photon routines we could learn from.

A clean Install:
at first i thought it might be a problem with my RTP binaryfile and
partition installs as i`v had several versions go bad after
installing/conf lots of apps so i decided to take a new partition and
do a new full RTP-A CD install.

it appears that even after a clean install that no Photon supplyed
examples want to compile, nearly all of them saying
“undefined reference to `PhAttach’” or whatever the Ph*/Pt* command
it was trying to compile at the time.

A mistery to me:
also one thing that seems strange to me is that the code example for
PtFileSelection() in the library reference makes use of proto.h
and `abimport.h as local headers but i assumed they are for internal
Phab use due to proto.h being installed as standard in

find /usr -name proto.h

/usr/lib/perl5/5.6.0/x86pc-nto/CORE/proto.h
/usr/photon/appbuilder/proto.h

and abimport.h not being found in this new full install, BUT was on
the old install somewere in my old Appbuilder dir i seem to remember,
eather way they arnt within the main include dirs so arnt used outside Phab ? and as far as i know, the RequestFile code below should just compile as is or kinners wouldnt have put it up on the web
(long time ago now) is the standard RTP-A install bad in some way so
preventing compileing with make from the shell without some magic potion
and years of C behind you ? (keep reading before you answer that).

searching for abimport in helpviewer shows 8 entrys and only 1 of them
PhMakeTransBitmap says its code for a Phab app, although i couldnt
work out how/were one might place this example code to make Phab compile
this example code or how the heck you make its requested abimport.h and
its not currently explained in any fashion anywere i can find.

1 working Photon APP Mame:
i was begining to think that no Photon based code would work in this
fresh install, but as a last try i thought i`d give a 3rd party coders
app a try and as it happens i had downloaded the Photon MAME binary and
source Phmame-0.37b2.2 that worked perfectly and produced a small Photon
window (and full screen although it didnt cover the shelf so was it
really full screen ?) running several of my working Mame games faster
(and way better GFX)than the windows based mame32 side by side.

Photon RequestFile:
SO will this below RequestFile compile as is on your newly installed
RTP-A and if so why wont it work here ?.

(understand i dont want to use Phab at this time, just a simple shell
make and run some tested/working sample C code to access basic builtin
photon gfx filerequester(s) ?/ textinput/ buttons /windows ect.

fully working and tested RTP code showing any and all current implimented
Photon Gfx calls as seen in many of the Amiga Gfx toolkits (ReqTools has
a greate sample of code and executables you can run to see whats best for
your needs for example) would be a very good thing to get a full idea of
whats currently available and useful to the budding RTP coders out there,
a reasonable request for the RTP developers release package install and
a good way to help educate new users/coders IMO).

and if its something to do with the above proto.h or missing abimport.h
how do i fix it ? #include "photon/appbuilder/proto.h" ? wouldnt work
would it ? as looking at that, it seems to be full of …/whatever link
lines that dont get found.

i would really like to understand whats happening and how one might
get a majority of sample code compiling so as to progress in RTP ?
(remember though im not a coder yet, but i do follow the more tec posts with ease so not total newby windows only user status, im considered
an advanced Amiga user of many years 1986/7) .

make requestfile

cc requestfile.c -o requestfile
/tmp/AAA109354_cc.o: In function main': /tmp/AAA109354_cc.o(.text+0x82): undefined reference to PtInit’
/tmp/AAA109354_cc.o(.text+0x1ff): undefined reference to `PtFileSelection’
cc: /usr/bin/ld error 1
make: *** [requestfile] Error 1

why are there undefined reference`s to PtInit and FileSelection here ?
i tryed adding #include <Ph.h> as they both use that according to
the help viewer docs without any improvement.

Photon requestfile code:

#include <stdio.h
#include <stdlib.h
#include <Pt.h

/* Program usage */
#ifdef __USAGE
%C - Open a file requester and print the selected filename to stdout
%C [-t title] [-p text] [-n text] [-ds] [default_file]

Where:

-t title Set the title of the file requester
-p text Set the contents of the positive button
-n text Set the contents of the negative button
-d Select drawers only
-s Save mode
#endif

int
main( int argc, char *argv[] )
{
PtFileSelectionInfo_t file;

char *default_path;
char *title;
char *positive_choice;
char *negative_choice;
int flags = 0, result = EXIT_FAILURE;

PtArg_t args[ 20 ];
int num_args = 0;

/* getopt */
int c, errflag = 0;

default_path = title = positive_choice = negative_choice = NULL;

/* Stop getopt from printing out any error message */
opterr = 0;

/* Very important */
memset( &file, 0, sizeof( file ) );

if( !PtInit( NULL ) )
{
while( (c = getopt( argc, argv, “t:p:n:ds” ) ) != -1 )
{
switch( c ) {
case ‘t’:
title = optarg;
break;
case ‘p’:
positive_choice = optarg;
break;
case ‘n’:
negative_choice = optarg;
break;

case ‘d’:
flags |= Pt_FSR_NO_SELECT_FILES | Pt_FSR_SELECT_DIRS;
/* Only show directories */
PtSetArg( &args[ num_args++ ], Pt_ARG_FS_FLAGS,
Pt_FS_SHOW_HIDDEN | Pt_FS_SEEK_KEY | Pt_FS_SINGLE_LEVEL | Pt_FS_SHOW_DIRS,
Pt_FS_ALL_FLAGS );
break;

case ‘s’:
flags |= Pt_FSR_CONFIRM_EXISTING;
break;

case ‘?’:
++errflag;
break;
}
}

if( num_args > 0 )
{
file.args = args;
file.num_args = num_args;
}

if( optind < argc )
{
default_path = argv[ optind ];
}

PtFileSelection(
NULL,
NULL,
title,
default_path,
NULL,
positive_choice,
negative_choice,
NULL,
&file,
flags );

if( file.ret == Pt_FSDIALOG_BTN1 )
{
/* Success */
printf( “%s”, file.path );
result = EXIT_SUCCESS;
}
}
return( result );
}


the original reason i wanted to try and use this was that its loosly
based on the amiga requestFile syntax and i have a RequestText written
by an old friend of mine in Amiga E, and it appears it might be easyest
to use that to base a Photon version of RequestText on, perhaps useing a
PtAlert ? or something like it.

eventuly i`d like to have all the future request* shell commands extended
so as to be able to specify an optional coordinate so as to place them
onscreen or indeed any Photon screen wereever the user wishes. perhaps
even have the option to snapshot their current coorinates to an env that
gets saved and loaded automaticly on next startup/reboot so allowing
personal control of this family of apps and encurageing others to do
the same if they wish.

while the amigas ReqTools gfx system seems easyer to code/place graphic requesters ect on screen, im hopeful that you readers can write Photon
code in the same compact and understandable style to help the newbys
wishing to advance the platform.

the above kiners code seems a good start, perhaps theres some more
advances you can enlighten the readers with ?, fully working and
commented code prefered for those of us without a current clue LOL.

just so its clear, i dont want to combine this RequestFile and my
proposed RequestText but create a stand alown RequestText to compliment
these other Request shell commands, and work out/fixing why i cant
compile any Ph/Pt code ofcourse LOL.

the ultmate outcome is to convert many amiga scripts i use dayly
from the shell and SID2 file manager (like Dopus4 but way better IMO)
perhaps useing the worker1.3.3 XPhoton port until a SID2 gets made
for RTP or someone ports worker to native Photon and goes a SID2
layout/extension for it at the same time). so allowing the average
person to create simple gfx frontend`s to many RTP shell commands

rewriting the Amiga shell scripts to work as easy and understandable
on RTP is slow going for me, the best option would be if someone wrote
an Amiga KingCon shell for use on RTP so making any current Amiga shell
script work as is on RTP, that in combination with the Request* set of
apps would make creating quick and easy Gfx frontends a LOT easyer
than it stands today.

an extended amiga style assign command plus a fully working RAD
(Recoverable Ram Disk) that expands and shrinks as you copy to/from
it for RTP would be a great addition many people could make great
use of if only it existed here.

as yet Kinners didnt place the requestChoice source on his webpage
or post it on the newsgroups (better for me as i dont currently have
web access) for general use, partly i beleave because of a few bugs
in the early Photon, but i would like to see it or a rewrite some day
as i might learn a few things along the way and the current binary doesnt
have the useage built in, it does work rather well considering it
was put together very quickly .

heres the fully working Amiga E source to the RequestText i`d like to
have converted to RTP if anyones willing to make and post it back here
(or perhaps in the new Binary list i proposed if someone at QNX
puts it online) for me.

anyone anvanced enough to try converting the open sourced Amiga E to
RTP yet ?, it can be found at any aminet archive if you fancy having
a go, its going to be very hard though as much is in assembly as i
understand it.

still it would be great if we could have a good PROC based language
if not this Amiga E with its masses of open source.



Amiga E RequestText Code:

/* RequestText By Video Nasty Written in Amiga E.
Ive converted my RequestText.rexx to Amiga E seemed quite easy to do
a few things needed modifying a little but its all pretty basic.
*/

MODULE ‘ReqTools’ /* use ReqTools Module */

DEF b[120]:STRING,t[45]:STRING,r

PROC main()
getargs()
IF r=1
IF reqtoolsbase:=OpenLibrary(‘reqtools.library’,37) /* want 37+ /
IF (r:=RtGetStringA(b,121,t,0,0))<>NIL /
stringreq /
WriteF(b) /
send stuff back to cli /
WriteF(’\n’)
ENDIF
CloseLibrary(reqtoolsbase) /
close library */
ELSE
WriteF(‘Failed to open reqtools.library v37+\n’)
ENDIF
ENDIF
ENDPROC

PROC getargs()
DEF myargs:PTR TO LONG,rdargs
myargs:=[0,0]
IF rdargs:=ReadArgs(‘TITLE/A,TEXT/A’,myargs,NIL)
t:=myargs[0]
b:=myargs[1]
r:=1
ELSE
r:=’$VER: RequestText 1.0 (11/01/97)’
WriteF(‘RequestText ? for help\n’)
ENDIF
ENDPROC



some system info:
logged in as root as you can see

uname -a

QNX rtp 6.00 2000/10/17-14:59:25edt x86pc x86

AKA RTP-A
Voodoo3/2000, 128 meg ram, jetway/ali motherboard, K6/2 500 CPU.

env

_=/usr/bin/env
PATH=/sbin:/usr/sbin:/usr/ucb:/usr/bin:/bin:/usr/local/bin:/opt/sbin:
/usr/photon/bin:/usr/photon/appbuilder:/usr/X11R6/bin
ABLPATH=/usr/photon/translations
PHOTON=/dev/photon
SHELL=/bin/sh
PHFONT=/dev/phfont
HOSTNAME=rtp
USER=root
PHTK_PATH=/usr/photon
PROCESSOR=x86
TMPDIR=/tmp
LD_LIBRARY_PATH=:/usr/X11R6/lib:/usr/photon/lib:/usr/photon/dll
PHWM=pwm
HOME=/root
DISPLAY=127.1:0
USER_NAME=/dev/photon
TERM=qansi-m
PHOTON_PATH=/usr/photon
PHOTON2_PATH=/usr/photon
PHSTART=1
FONTSLEUTH=/dev/fontsleuthctrl
LOGNAME=root
SYSNAME=nto


Hmm, after reading some more help viewer text yet again, the only
conclusion i can make without far more helpful text written for the
beginner is that eather this fresh full install is in someway bad or
your just not meant to make test.c and get an executable at the end
of it, if it has any reference to P*.h in it.

from the programmers Guide/introduction
file: hello.c


/*

  • File: hello.c
    */
    #include <Pt.h

int main( int argc, char *argv[] )
{
PtWidget_t *window;
PtArg_t args[1];

if ((window = PtAppInit(NULL, &argc, argv, 0, NULL))
== NULL)
PtExit(1);

PtSetArg(&args[0], Pt_ARG_TEXT_STRING,
“Press to exit”, 0);
PtCreateWidget(PtButton, window, 1, args);
PtRealizeWidget(window);

PtMainLoop();
return (EXIT_SUCCESS);
}

make hello

cc hello.c -o hello
/tmp/AAA621360_cc.o: In function main': /tmp/AAA621360_cc.o(.text+0x18): undefined reference to PtAppInit’
/tmp/AAA621360_cc.o(.text+0x30): undefined reference to PtExit' /tmp/AAA621360_cc.o(.text+0x6f): undefined reference to PtButton’
/tmp/AAA621360_cc.o(.text+0x75): undefined reference to PtCreateWidget' /tmp/AAA621360_cc.o(.text+0x84): undefined reference to PtRealizeWidget’
/tmp/AAA621360_cc.o(.text+0x8c): undefined reference to `PtMainLoop’
cc: /usr/bin/ld error 1
make: *** [hello] Error 1

Hmmmm, guess im not going to get very far like this, strange that the Photon Mame compiled just fine though, im lost.

Paul May, Manchester, UK,