PxLoadImage() compiling error!

When compiling, it always said "undefined symbolPxLoadImage_ ".But the head file(photon/PxImage.h) had been already included in my code.I don’t know why.And my compiling command was:
cc -o 425 425.c -lphoton -lphrtlib -lsocket -lunix
425.c is my source code.

Any idea?3X!

This is not a compiler error but rather a linker error. You need to link with the another library; phexlib3r.lib. This is documented in the online help but it’s definitely not easy to find ;-)

It still can not work!

warning(1028):_PxImageFunc is an undefined reference
file /usr/lib/phexlib3r.lib(/src/photon.114/photon/lib/exlib/PxImage.c):undefined symbol _PxImageFunc
cc:/usr/watcom/10.6/bin/wlink exited 1

That’s an iimprovement ;-) Try loading other photon library or try moving the order around.

try -lph -lphexlib
it might work… ;)

It still can not work.When trying -lph,it responded with"can not find library’ph’ " and “undefined symbol _PxImageFunc”.My os is QNX4.25,there are so many .lib,to try every lib is really a tough task.I tried all ph*.lib and graph*.lib and no use.What should I do next?

In your case it is:
cc -o 425 425.c -lphoton -lphexlib -lphrtlib -lsocket -lunix

PS:
-lph - qnx6
-lphoton - qnx4

anyone know?

So have you tried mezek’s suggestion above? Are you still getting errors? If so, post them.

Yes,I have tried that and the error information goes like this:


Warning(1028): _PxImageFunc is an undefined reference
file /usr/lib/phexlib3r.lib(/src/photon.114/photon/lib/exlib/PxImage.c): undefined symbol _PxImageFunc
Error(2010): I/O error processing 425 : Operation not permitted
cc:/usr/watcom/10.6/bin/wlink exited 1

up!