Skip navigation.
Home
The QNX Community Portal

View topic - Statically Linked Photon Applications

Statically Linked Photon Applications

Read-only archive of qnx.gui (Creating graphical applications within a GUI environment, such as Photon or PhAB) at inn.qnx.com

Statically Linked Photon Applications

Postby qnxhelper » Tue Jan 04, 2005 6:04 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
qnxhelper
New Member
 
Posts: 2
Joined: Wed Dec 15, 2004 6:32 pm

Re: Statically Linked Photon Applications

Postby 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

Misha Nefedov
 

RE: Re: Statically Linked Photon Applications

Postby alisha » Wed Nov 22, 2006 9:13 am

I have a similar problem:
udefined reference to 'PtInit'[/usr/qnx630/target/qnx6/usr/include/photon/ptT.h]
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
alisha
Active Member
 
Posts: 19
Joined: Wed May 17, 2006 3:58 am

RE: Re: Statically Linked Photon Applications

Postby micro » Fri Dec 08, 2006 12:33 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=PNphpBB2&file=viewtopic&p=35159#35159
micro
Senior Member
 
Posts: 458
Joined: Thu Jul 22, 2004 8:41 pm


Return to qnx.gui

Who is online

Users browsing this forum: No registered users and 1 guest