Re: Statically linked Performer app

New Message Reply Date view Thread view Subject view Author view

Scott McMillan (mcmillan++at++cambridge.com)
Thu, 13 Aug 1998 17:12:31 -0400


Pete Willemsen wrote:
>
> Hello.
>
> I'm attempting to statically link our performer app, but I'm running
> into a slight problem. I am able to perform the link, but when I run
> the application, I receive the following run time error during the loading
> of our database (a flight model).
>
> 15496:sgi_visual: rld: Fatal Error: attempted access to unresolvable symbol in /usr/lib32/libpfdb/libpfflt_ogl.so: pfNewLSource
>
> This seems strange to me since we are compiling and linking using the
> C++ compiler.
>
> Prior to this static linking experiment our code worked fine, but was
> being linked dynamically.
>
> Here's the link line from linking our application: Note that I want
> our libraries to remain dynamically linked, but would like as much of
> the performer app aside from these libraries to be statically linked.
> Also, I have the GL and remaining libraries dynamic due to link
> problems.
>
> /usr/bin/CC -n32 -o sgi_visual visualObject.o main.o -L../lib -lsim \
> -B static -L/usr/lib32/Performer/Static -lpfdu_ogl -lpfutil_ogl \
> -lpfui -L/usr/lib32/Performer/Static/libpfdb -lpfflt_ogl -lpf_ogl \
> -B dynamic -lGLU -lGL -limage -lXsgivc -lXext -lXmu -lX11 -lm -lC
>
> I guess I'm curious about what exactly I have to do to make a
> performer static executable. Any help is greatly appreciated.
> Thanks.

You need to sandwich at least the loader libraries between the -all and
-none linker options to make sure all their contents are linked in. You
may also need to do this for some of the other libs too but it has been
so long since I did this, I am no longer sure.

I believe the reason you have to do this is that since functions within
them are dlopen'ed it is not obvious to the linker that your executable
needs stuff from within them.

-- 
Scott McMillan                            mailto:mcmillan++at++cambridge.com
Cambridge Research Associates             http://www.cambridge.com
1430 Spring Hill Road, Ste. 200           Voice: (703) 790-0505 x7235
McLean, VA 22102                          Fax:   (703) 790-0370

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Aug 13 1998 - 14:15:02 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.