Wojtek:
Thanks for the reply.
Wojtek Lerch wrote:
Andy Rhind <> camerons_act@bigpond.com> > wrote:
Hi:
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.
ApMessageDialog,
ApClearWidget,
These two don’t exist in Photon 2 – change the code to use
PtAskQuestion() and PtClearWidget() instead.
Done - and it works- thank you…
PxLoadImage,
PxLoadGIF.
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
library.
Application Makefile
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
include abOfiles
MYOBJ =
include abSfiles
MYSRC =
include abHfiles
MYHDR =
Application Program
app: $(ABOBJ) $(MYOBJ)
$(LD) $(LDFLAGS) $(ABOBJ) $(MYOBJ) -M
-o slideshow -o Phem
/usr/photon/appbuilder/appbind slideshow
shr: $(ABOBJ) $(MYOBJ)
$(LD) $(SDFLAGS) $(ABOBJ) $(MYOBJ) -M
-o slideshow -o Phmem
/usr/photon/appbuilder/appbind slideshow
Headers
$(ABOBJ) $(MYOBJ): $(MYHDR)
Prototype Generation
proto:
approto -p $(ABSRC) $(MYSRC) > proto.h
initialize.o : globals.h
clean:
rm *.o
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)
linking commands.
So the library is intact and contains the function.
Any ideas?
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…
Thanks
Andy.
These functions are not mentioned in Help.
Uh… PxLoadImage() is, isn’t it?
–
Wojtek Lerch (> wojtek@qnx.com> ) QNX Software Systems Ltd.
–
NOTE- New phone,fax numbers
Andy Rhind
Symmetry Innovations Pty Ltd.
PO Box 3204
Weston
A.C.T 2611,
Australia
E-Mail: andy@symmetry.com.au
Phone: 61-2-6248 6611
Fax : 61-2-6248 8383