I’m trying to build a statically linked Photon application. I’m getting link errors for even a trivial application. I’m working with QNX 6.3.0 on an x86 platform.
I created a new application with only a PtWindow base, no other widgets, and no callbacks. It builds and runs with dynamically linked libraries. According to the documentation, you should be able to build a statically linked application by setting the Link Libraries field to “-Bstatic” in the Build and Debug Options tab under Project Properties. The following is the beginning of the link errors I get when I try it.
make -j 1 -Cx86 -fMakefile
make[1]: Entering directory /home/dmiller/simple_empty/x86' make -j 1 -Co -fMakefile make[2]: Entering directory
/home/dmiller/simple_empty/x86/o’
/usr/qnx630/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -c -Wc,-Wall -Wc,-Wno-parentheses -O -DNDEBUG -I. -I/home/dmiller/simple_empty/x86/o -I/home/dmiller/simple_empty/x86 -I/home/dmiller/simple_empty -I/home/dmiller/simple_empty/src -I/usr/qnx630/target/qnx6/usr/include /home/dmiller/simple_empty/src/abmain.c
/bin/rm -f /home/dmiller/simple_empty/x86/o/simple_empty
/usr/qnx630/host/qnx6/x86/usr/bin/qcc -Vgcc_ntox86 -o/home/dmiller/simple_empty/x86/o/simple_empty abmain.o -L. -L/usr/qnx630/target/qnx6/x86/lib -L/usr/qnx630/target/qnx6/x86/usr/lib -Bstatic -lAp -lph -lm
/usr/qnx630/target/qnx6/x86/usr/lib/libph.a(pf.o): In function PfAttach': pf.o(.text+0x10): undefined reference to
PfAttachCx’
/usr/qnx630/target/qnx6/x86/usr/lib/libph.a(pf.o): In function PfDetach': pf.o(.text+0x25): undefined reference to
PfDetachCx’
/usr/qnx630/target/qnx6/x86/usr/lib/libph.a(pf.o): In function PfLoadFont': pf.o(.text+0x44): undefined reference to
PfLoadFontCx’
/usr/qnx630/target/qnx6/x86/usr/lib/libph.a(pf.o): In function PfQueryFont': pf.o(.text+0x64): undefined reference to
PfQueryFontCx’
Any ideas? Thanks, Dennis