Porting Library - Undefined References

John J. Karcher devuser at alternateapproach.com
Wed Nov 7 02:52:38 CET 2018


Hello,

Thanks to Christian and Emery for their answers to my "openssl" problem 
with porting "libvncserver".  It worked like a charm.

After some more wrangling, the library actually builds.  I haven't 
written a real test program yet, so I don't know how well it works, but 
I'm optimistic since I didn't have to change any code.

But I have an odd problem.  I'd prefer to build it as a shared library, 
but it gives linker errors when I use:

   SHARED_LIB = yes

in "libvncserver.mk".  When I comment out that line, it seems to link 
successfully.

In the "target.mk" file for "test-libvncserver", if I use:

   LIBS = libvncserver

I get the following output:

   Program test/libports/libvncserver/test-libvncserver
   LINK     test-libvncserver
   libvncserver.lib.so: undefined reference to `sio_tryread'
   libvncserver.lib.so: undefined reference to `sio_send'
   libvncserver.lib.so: undefined reference to `htobe64'
   libvncserver.lib.so: undefined reference to `htobe16'
   libvncserver.lib.so: undefined reference to `sio_open'
   libvncserver.lib.so: undefined reference to `digestsha1'
   collect2: error: ld returned 1 exit status

If I use:

   LIBS = libc lwip zlib libcrypto libssl libpng jpeg libvncserver

the output is more verbose, but seems to boil down to the same basic idea.

Does anyone have any ideas on this?

  Thanks!
-- 
   John J. Karcher
   devuser at alternateapproach.com



More information about the users mailing list