Yura Vishnevskiy wrote:
> with -Wl,-Bstatic -lapr-1 -laprutil-1 -lexpat -Wl,-Bdynamic
> it takes static libs:
> debug: 
> file=/export/home/yura/Projects/MYPROJ/dev/trunk/build/solaris-gcc-x86-i686/Debug/apr/lib/libapr-1.a
>   [ archive ] 
> debug: 
> debug: 
> file=/export/home/yura/Projects/MYPROJ/dev/trunk/build/solaris-gcc-x86-i686/Debug/apr-util/lib/libaprutil-1.a
>   [ archive ] 
> debug: 
> debug: 
> file=/export/home/yura/Projects/MYPROJ/dev/trunk/build/solaris-gcc-x86-i686/Debug/expat/lib/libexpat.a
>   [ archive ] 
> 
> but can't find functions:
> 
> Undefined                     first referenced
>  symbol                           in file
> apr_thread_exit                     CMakeFiles/myproj.dir/ukl/ukl_session.o
> apr_socket_listen                   CMakeFiles/myproj.dir/ukl/ukl_server.o

Arr, perhaps that's why you were using --whole-archive.

You should have the -l's *after* the objects that reference them:

   gcc .... CMakeFiles/myproj.dir/cmd.o CMakeFiles/myproj.dir/atoms.o ....
      -Wl,-Bstatic -lapr-1 -laprutil-1 ...

It's much simpler using shared objects :-)

-- 

Rod.

Reply via email to