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 adding symbols: DSO missing from
command line
If I try to see the symbols of libpthread, it looks fine.
$ readelf -s /lib/x86_64-linux-gnu/libpthread.so.0 | grep pthread_create
199: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 pthread_create@@GLIBC_2.2.5
173: 0000000000008220 2814 FUNC LOCAL DEFAULT 13 __pthread_create_2_1
462: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 pthread_create@@GLIBC_2.2
Could you give any hints or pointers?
jww
95k88 gold badges397 silver badges861 bronze badges
asked Nov 11, 2013 at 8:33
4
You should mention the library on the command line after the object files being compiled:
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 -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 -lpthread
Explanation: the linking is dependent on the order of modules. Symbols are first requested, and then linked in from a library that has them. So you have to specify modules that use libraries first, and libraries after them. Like this:
gcc x.o y.o z.o -la -lb -lc
Moreover, in case there’s a circular dependency, you should specify the same library on the command line several times. So in case libb needs symbol from libc and libc needs symbol from libb, the command line should be:
gcc x.o y.o z.o -la -lb -lc -lb
answered Nov 11, 2013 at 11:53
Michael PankovMichael Pankov
3,5312 gold badges22 silver badges31 bronze badges
2
Background
The DSO missing from command line message will be displayed when the linker does not find the required symbol with it’s normal search but the symbol is available in one of the dependencies of a directly specified dynamic library.
In the past the linker considered symbols in dependencies of specified languages to be available. But that changed in some later version and now the linker enforces a more strict view of what is available. The message thus is intended to help with that transition.
What to do?
If you are the maintainer of the software
You should solve this problem by making sure that all libraries that are needed to satisfy the needed symbols are directly specified on the linker command line. Also keep in mind that order often matters.
If you are just trying to compile the software
As a workaround it’s possible to switch back to the more permissive view of what symbols are available by using the option -Wl,--copy-dt-needed-entries.
Common ways to inject this into a build are to export LDFLAGS before running configure or similar like this:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
Sometimes passing LDFLAGS="-Wl,--copy-dt-needed-entries" directly to make might also work.
answered Mar 10, 2019 at 10:18
textshelltextshell
1,60613 silver badges21 bronze badges
4
The error message depends on distribution / compiler version:
Ubuntu Saucy:
/usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
/lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
Ubuntu Raring: (more informative)
/usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command line
Solution: You may be missing a library in your compilation steps, during the linking stage. In my case, I added ‘-lz’ to makefile / GCC flags.
Background: DSO is a dynamic shared object or a shared library.
answered Nov 26, 2013 at 0:34
KevinKevin
2,6611 gold badge27 silver badges30 bronze badges
5
I found another case and therefore I thing you are all wrong.
This is what I had:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: eggtrayicon.o: undefined reference to symbol 'XFlush'
/usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line
The problem is that the command line DID NOT contain -lX11 — although the libX11.so should be added as a dependency because there were also GTK and GNOME libraries in the arguments.
So, the only explanation for me is that this message might have been intended to help you, but it didn’t do it properly. This was probably simple: the library that provides the symbol was not added to the command line.
Please note three important rules concerning linkage in POSIX:
- Dynamic libraries have defined dependencies, so only libraries from the top-dependency should be supplied in whatever order (although after the static libraries)
- Static libraries have just undefined symbols — it’s up to you to know their dependencies and supply all of them in the command line
- The order in static libraries is always: requester first, provider follows. Otherwise you’ll get undefined symbol message, just like when you forgot to add the library to the command line
- When you specify the library with
-l<name>, you never know whether it will takelib<name>.soorlib<name>.a. The dynamic library is preferred, if found, and static libraries only can be enforced by compiler option — that’s all. And whether you have any problems as above, it depends on whether you had static or dynamic libraries - Well, sometimes the dependencies may be lacking in dynamic libraries
answered Jul 14, 2016 at 13:34
EthourisEthouris
1,75113 silver badges18 bronze badges
3
I also encountered same problem. I do not know why, i just add -lpthread option to compiler and everything ok.
Old:
$ g++ -rdynamic -m64 -fPIE -pie -o /tmp/node/out/Release/mksnapshot ...*.o *.a -ldl -lrt
got following error. If i append -lpthread option to above command then OK.
/usr/bin/ld: /tmp/node/out/Release/obj.host/v8_libbase/deps/v8/src/base/platform/condition-variable.o: undefined reference to symbol 'pthread_condattr_setclock@@GLIBC_2.3.3'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
answered Aug 29, 2016 at 16:43
osexp2003osexp2003
2,73428 silver badges26 bronze badges
1
I found I had the same error. I was compiling a code with both lapack and blas. When I switched the order that the two libraries were called the error went away.
«LAPACK_LIB = -llapack -lblas» worked where
«LAPACK_LIB = -lblas -llapack» gave the error described above.
answered Dec 17, 2013 at 19:30
2
What I have found is that sometimes the library that the linker complains about is not the one causing the problem. Possibly there is a clever way to work out where the problem is but this is what I do:
- Comment out all the linked libraries in the link command.
- Clean out all .o’s, .so’s etc (Usually make clean is enough, but you may want to run a recursive find + rm, or something similar).
- Uncomment the libraries in the link command one at a time and re-arrange the order as necessary.
@peter karasev: I have come across the same problem with a gcc 4.8.2 cmake project on CentOS7. The order of the libraries in «target_link_libraries» section is important. I guess cmake just passes the list on to the linker as-is, i.e. it doesn’t try and work out the correct order. This is reasonable — when you think about it cmake can’t know what the correct order is until the linking is successfully completed.
answered Feb 5, 2015 at 9:31
AhrBAhrB
1111 silver badge3 bronze badges
If you are using CMake, there are some ways that you could solve it:
Solution 1: The most elegant one
add_executable(...)
target_include_directories(...)
target_link_libraries(target_name pthread)
Solution 2: using CMake find_package
find_package(Threads REQUIRED) # this will generate the flag for CMAKE_THREAD_LIBS_INIT
add_executable(...)
target_include_directories(...)
target_link_libraries(target_name ${CMAKE_THREAD_LIBS_INIT})
Solution 3: Change CMake flags
# e.g. with C++ 17, change to other version if you need
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
answered Apr 21, 2020 at 15:02
biendltbbiendltb
1,0591 gold badge12 silver badges20 bronze badges
Please add: CFLAGS="-lrt" and LDFLAGS="-lrt"
Martin Evans
44.9k16 gold badges83 silver badges94 bronze badges
answered Apr 13, 2017 at 8:16
劉大為劉大為
1972 silver badges5 bronze badges
When working with code that uses mathematical functions, you should also link them.
In my Case when compiling I provided the following, which worked for me.
mpicc -o testname testname.c -lm
answered Jun 12, 2021 at 13:17
The same problem happened to me when I use distcc to make my c++ project;
Finally I solved it with export CXX="distcc g++".
answered Feb 9, 2018 at 4:24
Jason GengJason Geng
591 silver badge8 bronze badges
Try to add -pthread at the end of the library list in the Makefile.
It worked for me.
Ivan Aracki
4,61311 gold badges58 silver badges68 bronze badges
answered Nov 21, 2019 at 8:57
RickyRicky
791 silver badge8 bronze badges
if you are using cmake and used pthreads, try add the following lines
find_package(Threads)
target_link_libraries(${CMAKE_THREAD_LIBS_INIT})
answered Feb 1, 2020 at 14:56
bowman hanbowman han
1,07715 silver badges23 bronze badges
The same thing happened to me as I was installing the HPCC benchmark (includes HPL and a few other benchmarks). I added -lm to the compiler flags in my build script and then it successfully compiled.
answered Dec 4, 2016 at 18:41
1
If using g++, make sure that you are not running gcc instead
answered Jun 21, 2018 at 22:46
Martin R.Martin R.
1,40616 silver badges16 bronze badges
2
Compile with g++ instead. It has worked in my case switching from gcc to g++.
answered Jul 2, 2021 at 15:34
alienflowalienflow
3806 silver badges19 bronze badges
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 adding symbols: DSO missing from
command line
If I try to see the symbols of libpthread, it looks fine.
$ readelf -s /lib/x86_64-linux-gnu/libpthread.so.0 | grep pthread_create
199: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 pthread_create@@GLIBC_2.2.5
173: 0000000000008220 2814 FUNC LOCAL DEFAULT 13 __pthread_create_2_1
462: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 pthread_create@@GLIBC_2.2
Could you give any hints or pointers?
jww
95k88 gold badges397 silver badges861 bronze badges
asked Nov 11, 2013 at 8:33
4
You should mention the library on the command line after the object files being compiled:
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 -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 -lpthread
Explanation: the linking is dependent on the order of modules. Symbols are first requested, and then linked in from a library that has them. So you have to specify modules that use libraries first, and libraries after them. Like this:
gcc x.o y.o z.o -la -lb -lc
Moreover, in case there’s a circular dependency, you should specify the same library on the command line several times. So in case libb needs symbol from libc and libc needs symbol from libb, the command line should be:
gcc x.o y.o z.o -la -lb -lc -lb
answered Nov 11, 2013 at 11:53
Michael PankovMichael Pankov
3,5312 gold badges22 silver badges31 bronze badges
2
Background
The DSO missing from command line message will be displayed when the linker does not find the required symbol with it’s normal search but the symbol is available in one of the dependencies of a directly specified dynamic library.
In the past the linker considered symbols in dependencies of specified languages to be available. But that changed in some later version and now the linker enforces a more strict view of what is available. The message thus is intended to help with that transition.
What to do?
If you are the maintainer of the software
You should solve this problem by making sure that all libraries that are needed to satisfy the needed symbols are directly specified on the linker command line. Also keep in mind that order often matters.
If you are just trying to compile the software
As a workaround it’s possible to switch back to the more permissive view of what symbols are available by using the option -Wl,--copy-dt-needed-entries.
Common ways to inject this into a build are to export LDFLAGS before running configure or similar like this:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
Sometimes passing LDFLAGS="-Wl,--copy-dt-needed-entries" directly to make might also work.
answered Mar 10, 2019 at 10:18
textshelltextshell
1,60613 silver badges21 bronze badges
4
The error message depends on distribution / compiler version:
Ubuntu Saucy:
/usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
/lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
Ubuntu Raring: (more informative)
/usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command line
Solution: You may be missing a library in your compilation steps, during the linking stage. In my case, I added ‘-lz’ to makefile / GCC flags.
Background: DSO is a dynamic shared object or a shared library.
answered Nov 26, 2013 at 0:34
KevinKevin
2,6611 gold badge27 silver badges30 bronze badges
5
I found another case and therefore I thing you are all wrong.
This is what I had:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: eggtrayicon.o: undefined reference to symbol 'XFlush'
/usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line
The problem is that the command line DID NOT contain -lX11 — although the libX11.so should be added as a dependency because there were also GTK and GNOME libraries in the arguments.
So, the only explanation for me is that this message might have been intended to help you, but it didn’t do it properly. This was probably simple: the library that provides the symbol was not added to the command line.
Please note three important rules concerning linkage in POSIX:
- Dynamic libraries have defined dependencies, so only libraries from the top-dependency should be supplied in whatever order (although after the static libraries)
- Static libraries have just undefined symbols — it’s up to you to know their dependencies and supply all of them in the command line
- The order in static libraries is always: requester first, provider follows. Otherwise you’ll get undefined symbol message, just like when you forgot to add the library to the command line
- When you specify the library with
-l<name>, you never know whether it will takelib<name>.soorlib<name>.a. The dynamic library is preferred, if found, and static libraries only can be enforced by compiler option — that’s all. And whether you have any problems as above, it depends on whether you had static or dynamic libraries - Well, sometimes the dependencies may be lacking in dynamic libraries
answered Jul 14, 2016 at 13:34
EthourisEthouris
1,75113 silver badges18 bronze badges
3
I also encountered same problem. I do not know why, i just add -lpthread option to compiler and everything ok.
Old:
$ g++ -rdynamic -m64 -fPIE -pie -o /tmp/node/out/Release/mksnapshot ...*.o *.a -ldl -lrt
got following error. If i append -lpthread option to above command then OK.
/usr/bin/ld: /tmp/node/out/Release/obj.host/v8_libbase/deps/v8/src/base/platform/condition-variable.o: undefined reference to symbol 'pthread_condattr_setclock@@GLIBC_2.3.3'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
answered Aug 29, 2016 at 16:43
osexp2003osexp2003
2,73428 silver badges26 bronze badges
1
I found I had the same error. I was compiling a code with both lapack and blas. When I switched the order that the two libraries were called the error went away.
«LAPACK_LIB = -llapack -lblas» worked where
«LAPACK_LIB = -lblas -llapack» gave the error described above.
answered Dec 17, 2013 at 19:30
2
What I have found is that sometimes the library that the linker complains about is not the one causing the problem. Possibly there is a clever way to work out where the problem is but this is what I do:
- Comment out all the linked libraries in the link command.
- Clean out all .o’s, .so’s etc (Usually make clean is enough, but you may want to run a recursive find + rm, or something similar).
- Uncomment the libraries in the link command one at a time and re-arrange the order as necessary.
@peter karasev: I have come across the same problem with a gcc 4.8.2 cmake project on CentOS7. The order of the libraries in «target_link_libraries» section is important. I guess cmake just passes the list on to the linker as-is, i.e. it doesn’t try and work out the correct order. This is reasonable — when you think about it cmake can’t know what the correct order is until the linking is successfully completed.
answered Feb 5, 2015 at 9:31
AhrBAhrB
1111 silver badge3 bronze badges
If you are using CMake, there are some ways that you could solve it:
Solution 1: The most elegant one
add_executable(...)
target_include_directories(...)
target_link_libraries(target_name pthread)
Solution 2: using CMake find_package
find_package(Threads REQUIRED) # this will generate the flag for CMAKE_THREAD_LIBS_INIT
add_executable(...)
target_include_directories(...)
target_link_libraries(target_name ${CMAKE_THREAD_LIBS_INIT})
Solution 3: Change CMake flags
# e.g. with C++ 17, change to other version if you need
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -pthread")
answered Apr 21, 2020 at 15:02
biendltbbiendltb
1,0591 gold badge12 silver badges20 bronze badges
Please add: CFLAGS="-lrt" and LDFLAGS="-lrt"
Martin Evans
44.9k16 gold badges83 silver badges94 bronze badges
answered Apr 13, 2017 at 8:16
劉大為劉大為
1972 silver badges5 bronze badges
When working with code that uses mathematical functions, you should also link them.
In my Case when compiling I provided the following, which worked for me.
mpicc -o testname testname.c -lm
answered Jun 12, 2021 at 13:17
The same problem happened to me when I use distcc to make my c++ project;
Finally I solved it with export CXX="distcc g++".
answered Feb 9, 2018 at 4:24
Jason GengJason Geng
591 silver badge8 bronze badges
Try to add -pthread at the end of the library list in the Makefile.
It worked for me.
Ivan Aracki
4,61311 gold badges58 silver badges68 bronze badges
answered Nov 21, 2019 at 8:57
RickyRicky
791 silver badge8 bronze badges
if you are using cmake and used pthreads, try add the following lines
find_package(Threads)
target_link_libraries(${CMAKE_THREAD_LIBS_INIT})
answered Feb 1, 2020 at 14:56
bowman hanbowman han
1,07715 silver badges23 bronze badges
The same thing happened to me as I was installing the HPCC benchmark (includes HPL and a few other benchmarks). I added -lm to the compiler flags in my build script and then it successfully compiled.
answered Dec 4, 2016 at 18:41
1
If using g++, make sure that you are not running gcc instead
answered Jun 21, 2018 at 22:46
Martin R.Martin R.
1,40616 silver badges16 bronze badges
2
Compile with g++ instead. It has worked in my case switching from gcc to g++.
answered Jul 2, 2021 at 15:34
alienflowalienflow
3806 silver badges19 bronze badges

gcc – libpthread.so.0: error adding symbols: DSO missing from command line
You should mention the library on the command line after the object files being compiled:
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 -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 -lpthread
Explanation: the linking is dependent on the order of modules. Symbols are first requested, and then linked in from a library that has them. So you have to specify modules that use libraries first, and libraries after them. Like this:
gcc x.o y.o z.o -la -lb -lc
Moreover, in case there’s a circular dependency, you should specify the same library on the command line several times. So in case libb needs symbol from libc and libc needs symbol from libb, the command line should be:
gcc x.o y.o z.o -la -lb -lc -lb
The error message depends on distribution / compiler version:
Ubuntu Saucy:
/usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
/lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
Ubuntu Raring: (more informative)
/usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command line
Solution: You may be missing a library in your compilation steps, during the linking stage. In my case, I added ‘-lz’ to makefile / GCC flags.
Background: DSO is a dynamic shared object or a shared library.
gcc – libpthread.so.0: error adding symbols: DSO missing from command line
Background
The DSO missing from command line message will be displayed when the linker does not find the required symbol with it’s normal search but the symbol is available in one of the dependencies of a directly specified dynamic library.
In the past the linker considered symbols in dependencies of specified languages to be available. But that changed in some later version and now the linker enforces a more strict view of what is available. The message thus is intended to help with that transition.
What to do?
If you are the maintainer of the software
You should solve this problem by making sure that all libraries that are needed to satisfy the needed symbols are directly specified on the linker command line. Also keep in mind that order often matters.
If you are just trying to compile the software
As a workaround it’s possible to switch back to the more permissive view of what symbols are available by using the option -Wl,--copy-dt-needed-entries.
Common ways to inject this into a build are to export LDFLAGS before running configure or similar like this:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
Sometimes passing LDFLAGS="-Wl,--copy-dt-needed-entries" directly to make might also work.
Related posts on gcc :
- c – What is the GCC builtin for an atomic set?
- homebrew – brew install gcc too time consuming
- assembly – Why does GCC produce ANDL $-16?
- gcc – gcov not generating gcda files
- gcc – How do I set up CLion to compile and run?
- c++ – using StringCchPrintf to build string from substring
- c – Is GCC loop unrolling flag really effective?
- c – makefile with gcc returns fatal error: no input files
когда я компилирую openvswitch-1.5.0, я столкнулся со следующей ошибкой компиляции:
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 '[email protected]@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from
command line
Если я попытаюсь увидеть символы libpthread, это выглядит нормально.
$ readelf -s /lib/x86_64-linux-gnu/libpthread.so.0 | grep pthread_create
199: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2.5
173: 0000000000008220 2814 FUNC LOCAL DEFAULT 13 __pthread_create_2_1
462: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2
не могли бы вы дать какие-либо подсказки или указатели?
758
10
10 ответов:
вы должны упомянуть библиотеку в командной строке после объектные файлы, скомпилированные:
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 -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 -lpthreadпояснение: связывание зависит от порядка модулей. Символы сначала запрашиваются, а затем связываются из библиотеки, в которой они есть. Таким образом, вы должны указать модули, которые используют библиотеки в первую очередь, и библиотеки после них. Вот так:
gcc x.o y.o z.o -la -lb -lcкроме того, если есть циклическая зависимость, вы должны указать ту же библиотеку на командная строка несколько раз. Так что на всякий случай
libbнужен символlibcиlibcнужен символlibbкомандная строка должна быть:gcc x.o y.o z.o -la -lb -lc -lb
сообщение об ошибке зависит от дистрибутива / версии компилятора:
Ubuntu Дерзкий:
/usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_' /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command lineUbuntu Raring: (более информативно)
/usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command lineустранение: возможно, Вам не хватает библиотеки на этапах компиляции, на этапе компоновки. В моем случае я добавил ‘- lz’ для флагов makefile / GCC.
Справочная информация: DSO-это динамический общий объект или общая библиотека.
я нашел другой случай, и поэтому я думаю, что вы все ошибаетесь.
вот что у меня было:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: eggtrayicon.o: undefined reference to symbol 'XFlush' /usr/lib64/libX11.so.6: error adding symbols: DSO missing from command lineпроблема в том, что командная строка не содержит
-lX11— хотя libX11.so следует добавить в качестве зависимости, потому что в аргументах также были библиотеки GTK и GNOME.Итак, единственное объяснение для меня заключается в том, что это сообщение могло быть предназначено помочь, но он не сделал это должным образом. Это было, вероятно, просто: библиотека, которая предоставляет символ, не была добавлена в командную строку.
обратите внимание на три важных правила, касающиеся связи в POSIX:
- динамические библиотеки имеют определенные зависимости, поэтому только библиотеки из верхней зависимости должны быть предоставлены в любом порядке (хотя и после статических библиотек)
- статические библиотеки только неопределенные символы — это до вас, чтобы знать их зависимости и поставить все из них в команду линия
- порядок статический библиотеки всегда: истец впервые,провайдер следующее. В противном случае вы получите неопределенное символьное сообщение, как и тогда, когда вы забыли добавить библиотеку в командную строку
- при указании библиотеки с помощью
-l<name>, вы никогда не знаете, будет ли он приниматьlib<name>.soилиlib<name>.a. Динамическая библиотека предпочтительна, если она найдена, а статические библиотеки могут быть применены только с помощью параметра компилятора-это все. И есть ли у вас какие-либо проблемы, как указано выше, это зависит от того, были ли у вас статические или динамические библиотеки- ну, иногда зависимости могут отсутствовать в динамических библиотеках: D
Я обнаружил, что у меня была та же ошибка. Я компилировал код как с lapack, так и с blas. Когда я переключил порядок, что две библиотеки были вызваны ошибка ушла.
«LAPACK_LIB = — llapack-lblas» работал где
«LAPACK_LIB = — lblas-llapack» выдал ошибку, описанную выше.
Я также столкнулся с той же проблемой. Я не знаю, почему, я просто добавить
-lpthreadопция для компилятора и все в порядке.старый:
$ g++ -rdynamic -m64 -fPIE -pie -o /tmp/node/out/Release/mksnapshot ...*.o *.a -ldl -lrtполучил следующее сообщение об ошибке. Если я добавлю
-lpthreadопция выше команды, то ОК./usr/bin/ld: /tmp/node/out/Release/obj.host/v8_libbase/deps/v8/src/base/platform/condition-variable.o: undefined reference to symbol '[email protected]@GLIBC_2.3.3' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Я обнаружил, что иногда библиотека, на которую жалуется компоновщик, не является причиной проблемы. Возможно, есть умный способ решить, где проблема, но это то, что я делаю:
- закомментируйте все связанные библиотеки в команде link.
- очистить все .o’s,. so и т. д. (Обычно достаточно очистить, но вы можете запустить рекурсивный find + rm или что-то подобное).
- раскомментируйте библиотеки в ссылке команда по одному за раз и перестроить порядок по мере необходимости.
@peter karasev: я столкнулся с той же проблемой с проектом gcc 4.8.2 cmake на CentOS7. Важен порядок библиотек в разделе «target_link_libraries». Я предполагаю, что cmake просто передает список компоновщику как есть, т. е. он не пытается выработать правильный порядок. Это разумно — когда вы думаете об этом cmake не может знать, что правильный порядок, пока связь не будет успешно завершенный.
пожалуйста, добавьте:
CFLAGS="-lrt"иLDFLAGS="-lrt"
то же самое произошло со мной, когда я устанавливал тест HPCC (включая HPL и несколько других тестов). Я добавил
-lmк флагам компилятора в моем скрипте сборки, а затем он успешно скомпилирован.
та же проблема случилась со мной, когда я использую
distccсделать мой проект c++ ;
Наконец я решил его сexport CXX="distcc g++".
при использовании
g++убедитесь, что вы не используете
Когда я компилирую openvswitch-1.5.0, я столкнулся с следующей ошибкой компиляции:
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 '[email protected]@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from
command line
Если я пытаюсь увидеть символы libpthread, это выглядит нормально.
$ readelf -s /lib/x86_64-linux-gnu/libpthread.so.0 | grep pthread_create
199: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2.5
173: 0000000000008220 2814 FUNC LOCAL DEFAULT 13 __pthread_create_2_1
462: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2
Не могли бы вы дать какие-либо подсказки или указатели?
Ответ 1
Вы должны указать библиотеку в командной строке после компиляции файлов объектов:
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 -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 -lpthread
Объяснение: привязка зависит от порядка модулей. Сначала запрашиваются символы, а затем связаны из библиотеки, в которой они есть. Таким образом, вы должны указать модули, которые сначала используют библиотеки, и библиотеки после них. Вот так:
gcc x.o y.o z.o -la -lb -lc
Кроме того, если есть циклическая зависимость, вы должны указать одну и ту же библиотеку в командной строке несколько раз. Поэтому в случае, если libb нужен символ из libc, а libc нужен символ из libb, то команда должна быть:
gcc x.o y.o z.o -la -lb -lc -lb
Ответ 2
Сообщение об ошибке зависит от версии дистрибутива/компилятора:
Ubuntu Saucy:
/usr/bin/ld: /mnt/root/ffmpeg-2.1.1//libavformat/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
/lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
Ubuntu Raring: (более информативно)
/usr/bin/ld: note: 'uncompress' is defined in DSO /lib/x86_64-linux-gnu/libz.so.1 so try adding it to the linker command line
Решение. Возможно, вам не хватает библиотеки на этапах компиляции на этапе компоновки. В моем случае я добавил ‘-lz’ в флаги make файла /GCC.
Справочная информация: DSO — это динамический общий объект или общая библиотека.
Ответ 3
Я нашел другой случай, и поэтому я уверен, что вы все ошибаетесь.
Это то, что у меня было:
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: eggtrayicon.o: undefined reference to symbol 'XFlush'
/usr/lib64/libX11.so.6: error adding symbols: DSO missing from command line
Проблема заключается в том, что в командной строке DID NOT не содержится -lX11 — хотя libX11.so следует добавить как зависимость, поскольку в аргументах были также библиотеки GTK и GNOME.
Итак, единственное объяснение для меня в том, что это сообщение могло быть предназначено для помочь вам, но это не помогло. Это было, вероятно, просто: библиотека, которая предоставляет символ, не была добавлена в командную строку.
Обратите внимание на три важных правила, касающиеся связи в POSIX:
- Динамические библиотеки имеют определенные зависимости, поэтому только библиотеки из верхней зависимости должны предоставляться в любом порядке (хотя после статических библиотек)
- В статических библиотеках есть только символы undefined — вам нужно знать их зависимости и предоставлять их все в командной строке
- Порядок в статических библиотеках всегда: запрашивающий первый, поставщик следует. В противном случае вы получите сообщение undefined, как если бы вы забыли добавить библиотеку в командную строку
- Когда вы укажете библиотеку с
-l<name>, вы никогда не узнаете, примет ли онаlib<name>.soилиlib<name>.a. Динамическая библиотека предпочтительнее, если она найдена, а статические библиотеки могут быть принудительно реализованы с помощью опции компилятора — все. И есть ли у вас какие-либо проблемы, как указано выше, это зависит от того, были ли у вас статические или динамические библиотеки - Ну, иногда в динамических библиотеках могут отсутствовать зависимости: D
Ответ 4
Я обнаружил, что у меня была такая же ошибка. Я составлял код как с лапкой, так и с blas. Когда я переключил порядок, названный двумя библиотеками, ошибка исчезла.
«LAPACK_LIB = -llapack -lblas» работал там
«LAPACK_LIB = -lblas -llapack» дал ошибку, описанную выше.
Ответ 5
Я также столкнулся с той же проблемой. Я не знаю, почему, я просто добавляю параметр -lpthread в компилятор и все в порядке.
Старый:
$ g++ -rdynamic -m64 -fPIE -pie -o /tmp/node/out/Release/mksnapshot ...*.o *.a -ldl -lrt
появилась следующая ошибка. Если я добавлю параметр -lpthread в команду выше, то ОК.
/usr/bin/ld: /tmp/node/out/Release/obj.host/v8_libbase/deps/v8/src/base/platform/condition-variable.o: undefined reference to symbol '[email protected]@GLIBC_2.3.3'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Ответ 6
Я обнаружил, что иногда библиотека, на которую жалуется компоновщик, не вызывает проблемы. Возможно, есть умный способ решить, где проблема, но это то, что я делаю:
- Прокомментируйте все связанные библиотеки в команде link.
- Очистите все .o,.so и т.д. (Обычно достаточно очистить, но вы можете запустить рекурсивную find + rm или что-то подобное).
- Раскомментируйте библиотеки в команде ссылки по одному и переустановите заказ по мере необходимости.
@peter karasev: Я столкнулся с той же проблемой с проектом gcc 4.8.2 cmake на CentOS7. Порядок библиотек в разделе «target_link_libraries» важен. Я думаю, что cmake просто передает список на компоновщик as-is, т.е. Не пытается и не выполняет правильный порядок. Это разумно — когда вы думаете об этом, cmake не может знать, какой правильный порядок до тех пор, пока соединение не будет успешно завершено.
Ответ 7
Добавьте: CFLAGS="-lrt" и LDFLAGS="-lrt"
Ответ 8
Та же проблема возникла со мной, когда я использовал distcc для создания своего проекта c++; Наконец я решил это с помощью export CXX="distcc g++".
Ответ 9
То же самое случилось со мной, когда я устанавливал тест HPCC (включая HPL и несколько других тестов). Я добавил -lm в флагов компилятора в моей сборке script, а затем успешно скомпилировал.
Ответ 10
Если вы используете g++, убедитесь, что вы не используете вместо этого gcc
Ответ 11
Фон
DSO missing from command line сообщении DSO missing from command line будет отображаться, когда компоновщик не найдет требуемый символ при обычном поиске, но символ доступен в одной из зависимостей непосредственно указанной динамической библиотеки.
В прошлом компоновщик считал символы в зависимостях указанных языков доступными. Но это изменилось в более поздней версии, и теперь компоновщик обеспечивает более строгое представление о том, что доступно. Таким образом, сообщение предназначено, чтобы помочь с этим переходом.
Что делать?
Если вы являетесь сопровождающим программного обеспечения
Вы должны решить эту проблему, убедившись, что все библиотеки, необходимые для удовлетворения необходимых символов, непосредственно указаны в командной строке компоновщика. Также имейте в виду, что порядок часто имеет значение.
Если вы просто пытаетесь скомпилировать программное обеспечение
В качестве обходного пути можно переключиться обратно к более разрешающему представлению о том, какие символы доступны, используя опцию -Wl,--copy-dt-needed-entries.
Распространенные способы внедрить это в сборку — экспортировать LDFLAGS перед запуском configure или подобного:
export LDFLAGS="-Wl,--copy-dt-needed-entries"
Иногда передача LDFLAGS="-Wl,--copy-dt-needed-entries" напрямую для make может также работать.
Posted By: Anonymous
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 '[email protected]@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from
command line
If I try to see the symbols of libpthread, it looks fine.
$ readelf -s /lib/x86_64-linux-gnu/libpthread.so.0 | grep pthread_create
199: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2.5
173: 0000000000008220 2814 FUNC LOCAL DEFAULT 13 __pthread_create_2_1
462: 0000000000008220 2814 FUNC GLOBAL DEFAULT 13 [email protected]@GLIBC_2.2
Could you give any hints or pointers?
Solution
You should mention the library on the command line after the object files being compiled:
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 -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 -lpthread
Explanation: the linking is dependent on the order of modules. Symbols are first requested, and then linked in from a library that has them. So you have to specify modules that use libraries first, and libraries after them. Like this:
gcc x.o y.o z.o -la -lb -lc
Moreover, in case there’s a circular dependency, you should specify the same library on the command line several times. So in case libb needs symbol from libc and libc needs symbol from libb, the command line should be:
gcc x.o y.o z.o -la -lb -lc -lb
Answered By: Anonymous
Related Articles
- «No such file or directory» error when executing a binary
- insert tables in dataframe with years from 2000 to 20018…
- How to fix symbol lookup error: undefined symbol errors in a…
- Pandas pivot_table: filter on aggregate function
- How to address the error «MBUF: error setting mempool…
- SQL find sum of entries by date including previous date
- Maven2: Missing artifact but jars are in place
- I need to sum values with specific condition
- Obtain most recent value for based on index in a pandas…
- Add calculated column to df2 for every row entry in df2…
Disclaimer: This content is shared under creative common license cc-by-sa 3.0. It is generated from StackExchange Website Network.
