OpenQNX :: The QNX Community Portal

Jul 05, 2008 - 12:10 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 50 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
qnxhelper
Post subject: Statically Linked Photon Applications  PostPosted: Jan 04, 2005 - 06:04 PM
New Member


Joined: Dec 15, 2004
Posts: 2

Quote:

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
 
 View user's profile Send private message  
Reply with quote Back to top
Misha Nefedov
Post subject: Re: Statically Linked Photon Applications  PostPosted: Jan 04, 2005 - 06:41 PM
Guest





-lfont

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

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

 
   
Reply with quote Back to top
alisha
Post subject: RE: Re: Statically Linked Photon Applications  PostPosted: Nov 22, 2006 - 09:13 AM
Active Member


Joined: May 17, 2006
Posts: 19

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
 
 View user's profile Send private message  
Reply with quote Back to top
micro
Post subject: RE: Re: Statically Linked Photon Applications  PostPosted: Dec 08, 2006 - 12:33 PM
Senior Member


Joined: Jul 22, 2004
Posts: 325

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
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.