Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pxs help

7 views
Skip to first unread message

Tupshin Harper

unread,
Feb 17, 2003, 8:04:43 PM2/17/03
to perl6-i...@perl.org
So I'm gonna take a look at the native calling functionality of parrot
to see about access to an XML parser.

Taking a look at the pxs example (is this the right place to be
looking?), and I'm having problems compiling PQt.C per it's own
instructions. After getting the qt headers installed, the following has
problems all across the map.
My command:
g++ -fPIC -I/usr/include/qt3 -I../../include -L$QTDIR -c PQt.C -lqt

produces:
In file included from ../../include/parrot/global_setup.h:18,
from ../../include/parrot/parrot.h:198,
from ../../include/parrot/pxs.h:14,
from PQt.C:15:
../../include/parrot/interpreter.h:34: conflicting types for `typedef struct
Parrot_Interp*Parrot_Interp'
../../include/parrot/interpreter.h:32: previous declaration as `struct
Parrot_Interp'
In file included from ../../include/parrot/interpreter.h:46,
from ../../include/parrot/global_setup.h:18,
from ../../include/parrot/parrot.h:198,
from ../../include/parrot/pxs.h:14,
from PQt.C:15:
../../include/parrot/warnings.h:27: conflicting types for `struct
Parrot_Interp
'
../../include/parrot/interpreter.h:34: previous declaration as `typedef
struct
Parrot_Interp*Parrot_Interp'
In file included from ../../include/parrot/parrot.h:201,
from ../../include/parrot/pxs.h:14,
from PQt.C:15:
../../include/parrot/datatypes.h:117: syntax error before `typename'
In file included from PQt.C:15:
../../include/parrot/pxs.h:17: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:17: syntax error before `)' token
../../include/parrot/pxs.h:17: variable or field `PXS_reti' declared void
../../include/parrot/pxs.h:17: initializer list being treated as compound
expression
../../include/parrot/pxs.h:18: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:18: syntax error before `)' token
../../include/parrot/pxs.h:18: variable or field `PXS_retn' declared void
../../include/parrot/pxs.h:18: initializer list being treated as compound
expression
../../include/parrot/pxs.h:19: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:19: syntax error before `*' token
../../include/parrot/pxs.h:20: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:20: syntax error before `*' token
../../include/parrot/pxs.h:21: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:22: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:23: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:24: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:25: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:26: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:26: syntax error before `*' token
../../include/parrot/pxs.h:27: `parrot_interp_t' was not declared in
this scope
../../include/parrot/pxs.h:27: syntax error before `char'
PQt.C:25: `parrot_interp_t' was not declared in this scope
PQt.C:25: syntax error before `,' token
PQt.C: In function `void QApplication_new(...)':
PQt.C:32: `interp' undeclared (first use this function)
PQt.C:32: (Each undeclared identifier is reported only once for each
function
it appears in.)
PQt.C: At global scope:
PQt.C:36: syntax error before `,' token
PQt.C: In function `void QApplication_exec(...)':
PQt.C:37: `object' undeclared (first use this function)
PQt.C: At global scope:
PQt.C:40: syntax error before `,' token
PQt.C: In function `void QApplication_setMainWidget(...)':
PQt.C:41: `PXS_shiftp' cannot be used as a function
PQt.C: At global scope:
PQt.C:50: syntax error before `,' token
PQt.C: In function `void QLabel_new(...)':
PQt.C:51: `PXS_shiftcs' cannot be used as a function
PQt.C: At global scope:
PQt.C:57: syntax error before `,' token
PQt.C:61: syntax error before `,' token
PQt.C: In function `void QLabel_resize(...)':
PQt.C:62: `PXS_shifti' cannot be used as a function
PQt.C:63: `PXS_shifti' cannot be used as a function


Could somebody give me any 1 or more of the following? ;-)
1) compilation tips for PQt.C
2) alternate pxs examples
3) docs for pxs
4) a swift kick in the pants saying: don't do A, do B

-Tupshin

Leopold Toetsch

unread,
Feb 18, 2003, 3:46:20 AM2/18/03
to Tupshin Harper, perl6-i...@perl.org
Tupshin Harper wrote:

>
> Taking a look at the pxs example (is this the right place to be
> looking?), and I'm having problems compiling PQt.C per it's own
> instructions.


I don't know, what's up with pxs, but AFAIK this is obsolete and
replaced by the NCI (native call interface).

Attached is the Qt example rewritten to NCI. This will probably only run
on i386, which builds thunking functions on the fly, other $archs will
need adjustment in call_list.txt.

s. also t/pmc/nci.t, nci.c, build_nativecall.pl, call_list.txt and last
but not least the docs.

BTW, should I check this in?
Into examples/nci or just replace the pxs files?

leo

PQt.C
QtHelloWorld.pasm

Tupshin Harper

unread,
Feb 18, 2003, 4:22:46 AM2/18/03
to Leopold Toetsch, perl6-i...@perl.org
Thank you very much. That example works for me.
One question: What is the preferred way of telling parrot about .so
files like libPQt.so.
Is there some location within the parrot hierarchy where these can be
put to be dynamically found? If not, should there be?

If pxs is truly obsolete, please trash it ;-)...it would help greatly
when trying to figure out where to go...also a short doc(e.g.
docs/native_calling.pod) would be great to help people find this.

Thanks
-Tupshin

Brent Dax

unread,
Feb 18, 2003, 4:51:20 AM2/18/03
to Tupshin Harper, Leopold Toetsch, perl6-i...@perl.org
Tupshin Harper:
# If pxs is truly obsolete, please trash it ;-).

I'm not confident enough about PXS to trash it, but I've commented a few
files appropriately.

--Brent Dax <bren...@cpan.org>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)

>How do you "test" this 'God' to "prove" it is who it says it is?
"If you're God, you know exactly what it would take to convince me. Do
that."
--Marc Fleury on alt.atheism


Melvin Smith

unread,
Feb 18, 2003, 10:06:15 AM2/18/03
to Tupshin Harper, perl6-i...@perl.org
At 05:04 PM 2/17/2003 -0800, Tupshin Harper wrote:
>So I'm gonna take a look at the native calling functionality of parrot to
>see about access to an XML parser.
>
>Taking a look at the pxs example (is this the right place to be looking?),
>and I'm having problems compiling PQt.C per it's own instructions. After
>getting the qt headers installed, the following has problems all across
>the map.
>My command:

I think pxs might be a bit out of date/sync with the rest of Parrot. I haven't
been active lately so someone else will have to confirm, but as it was only
a toy to hint on how to start a native call interface, I do not think of it as
sacred.

If someone will checkin an alternative (or point it out to me),
I'll remove pxs altogether.

-Melvin

0 new messages