Statically Linked Photon Applications

bridged with qnx.gui
Post Reply
qnxhelper

Statically Linked Photon Applications

Post by qnxhelper » Tue Jan 04, 2005 6:24 pm

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

Misha Nefedov

Re: Statically Linked Photon Applications

Post by Misha Nefedov » Tue Jan 04, 2005 6:41 pm

-lfont

"qnxhelper" <qnxhelper@localhost-dot-localdomain.no-spam.invalid> wrote in
message news:cren0a$j7k$1@inn.qnx.com...
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

alisha

RE: Re: Statically Linked Photon Applications

Post by alisha » Mon Dec 04, 2006 10:47 pm

I have a similar problem:
udefined reference to
'PtInit'
udefined reference to
'_PtGetResource'[/usr/qnx630/target/qnx6/usr/include/photon/ptT.h]
udefined reference to
'PtButton'[/usr/qnx630/target/qnx6/usr/include/photon/ptT.h]
udefined reference to
'PtCreate'[/usr/qnx630/target/qnx6/usr/include/photon/ptT.h]
udefined reference to
'PtExit'[/usr/qnx630/target/qnx6/usr/include/photon/ptT.h]
......

which lib or linker I lost?Please guide me.Thanks

micro

RE: Re: Statically Linked Photon Applications

Post by micro » Fri Dec 08, 2006 1:53 pm

alisha, tried -l ph or -l photon?

For -l font, it won´t work for me, i still geht these errors
-->
http://www.openqnx.com/index.php?name=P ... 5159#35159

Post Reply

Return to “qnx.gui”