“/usr/bin/ld: cannot find -lz”

I am trying to compile Android source code under Ubuntu 10.04. I get an error saying, /usr/bin/ld: cannot find -lz Can you please tell me how can I fix it? What does cannot find -lz mean? Here’s the full error message: external/qemu/Makefile.android:1101: warning: overriding commands for target `external/qemu/android/avd/hw-config-defs.h’ external/qemu/Makefile.android:933: warning: ignoring old commands for target … Read more

libpthread.so.0: error adding symbols: DSO missing from command line

When I’m compiling openvswitch-1.5.0, I’ve encountered the following compile error: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-security -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -Wno-override-init -g -O2 -export-dynamic ***-lpthread*** -o utilities/ovs-dpctl utilities/ovs-dpctl.o lib/libopenvswitch.a /home/jyyoo/src/dpdk/build/lib/librte_eal.a /home/jyyoo/src/dpdk/build/lib/libethdev.a /home/jyyoo/src/dpdk/build/lib/librte_cmdline.a /home/jyyoo/src/dpdk/build/lib/librte_hash.a /home/jyyoo/src/dpdk/build/lib/librte_lpm.a /home/jyyoo/src/dpdk/build/lib/librte_mbuf.a /home/jyyoo/src/dpdk/build/lib/librte_ring.a /home/jyyoo/src/dpdk/build/lib/librte_mempool.a /home/jyyoo/src/dpdk/build/lib/librte_malloc.a -lrt -lm /usr/bin/ld: /home/jyyoo/src/dpdk/build/lib/librte_eal.a(eal.o): undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5’ /lib/x86_64-linux-gnu/libpthread.so.0: error … Read more

g++ undefined reference to typeinfo

I just ran across the following error (and found the solution online, but it’s not present in Stack Overflow): (.gnu.linkonce.[stuff]): undefined reference to [method] [object file]:(.gnu.linkonce.[stuff]): undefined reference to `typeinfo for [classname]’ Why might one get one of these “undefined reference to typeinfo” linker errors? (Bonus points if you can explain what’s going on behind … Read more

Resolving LNK4098: defaultlib ‘MSVCRT’ conflicts with

This warning: LINK : warning LNK4098: defaultlib ‘MSVCRT’ conflicts with use of other libs; use /NODEFAULTLIB:library is a fairly common warning in Visual Studio. I’d like to understand the exact reason for it and the right way (if at all) to handle it. This comes up in a debug build, compiled with /MDd. The project … Read more