Thanks for the reply.
Wojtek Lerch wrote:
Andy Rhind <> email@example.com> > wrote:
I am trying to recompile a copy of slideshow from QNX4/Photon 1.14 to
QNXRTP Photon 2. I get a large number of undefined references. Some of
which are :
When you say “recompile”, I assume you mean you did re-generate the code
using the new PhAB for RTP – is that correct?
I took the blunderbus approach and copied the whole slideshow directory
from QNX4 to RTP, as it is. Then opened it in PhAb (RTP), generated it
and then tried to make it. Thats when the differences showed up.
These two don’t exist in Photon 2 – change the code to use
PtAskQuestion() and PtClearWidget() instead.
Done - and it works- thank you…
These two should be in a library called “libphexlib.a”. Does your
Makefile tell the linker to use that library? (Before you ask: yes, it
should do that by default.) Could I see the output from make – both the
commands and the error messages?
The following are the makefile and the makefile output. I have got to
the point now where most things are found except that I get “undefined
reference PxLoadImage”. As you can see I have even forced the necessary
CFLAGS = -g -I.
LDFLAGS = -g -Bstatic $(DEBUG) -l Ap -l phexlib -l /usr/photon/lib/libphexlib.a -l ph -l phrender $(PHABOPTS) -Bdynamic -l m
SDFLAGS = -g $(DEBUG) -l Ap -l phexlib -l /usr/photon/lib/libphexlib.a -l ph -l phrender $(PHABOPTS) -Bdynamic -l m
app: $(ABOBJ) $(MYOBJ)
$(LD) $(LDFLAGS) $(ABOBJ) $(MYOBJ) -M
-o slideshow -o Phem
shr: $(ABOBJ) $(MYOBJ)
$(LD) $(SDFLAGS) $(ABOBJ) $(MYOBJ) -M
-o slideshow -o Phmem
$(ABOBJ) $(MYOBJ): $(MYHDR)
approto -p $(ABSRC) $(MYSRC) > proto.h
initialize.o : globals.h
The output of the make is :-
cc -g -I. -c filesel_setup.c -o filesel_setup.o
cc -g -I. -c initialize.c -o initialize.o
cc -g -I. -c screen.c -o screen.o
cc -g -Wc,-O3 -fomit-frame-pointer -Wl,-O3 -fomit-frame-pointer
-l Ap -l phexlib -l /x86/usr/lib/libphexlib.a -l ph -l phrender
-Bdynamic -l m abmain.o base_focus.o base_setup.o exit_app.o filesel_open.o
filesel_setup.o initialize.o screen.o -M
-o slideshow -o Phmem
screen.o: In function
screen_read': screen.o(.text+0x66f): undefined reference to PxLoadImage’
cc: /usr/bin/ld error 1
make: *** [shr] Error 1
I have copied/pasted the example from the PxLoadImage halp page. This
compiles and links without any problem, using the same (or similar)
So the library is intact and contains the function.
Also I see that phappbind has been replaced with phabbind. phabbind
seems to expect a directory structure that doesnt match the one that I
have. I get the feeling that slideshow was hand written a long time ago.
Its becomming a better learning exercise than I expected…
These functions are not mentioned in Help.
Uh… PxLoadImage() is, isn’t it?
Wojtek Lerch (> firstname.lastname@example.org> ) QNX Software Systems Ltd.
NOTE- New phone,fax numbers
Symmetry Innovations Pty Ltd.
PO Box 3204
Phone: 61-2-6248 6611
Fax : 61-2-6248 8383