使用armadillo库编译的C ++代码没有错误。但是当我在链接部分添加-static时,我收到此错误:
make all
Building file: ../scr/main.cpp
Invoking: GCC C++ Compiler
g++ -std=c++1y -I./armadillo/armadillo-6.400.3/include -I./cppClassLib -O3 -Wall -c -fmessage-length=0 -larmadillo -lblas -llapack -lpthread -MMD -MP -MF"scr/main.d" -MT"scr/main.o" -o "scr/main.o" "../scr/main.cpp"
Finished building: ../scr/main.cpp
Building target: matmult
Invoking: GCC C++ Linker
g++ -L./armadillo/armadillo-6.400.3/ -static -o "matmult" ./scr/main.o -lm -lpthread -lblas -llapack
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `openblas_fork_handler':
(.text+0x2a0): undefined reference to `pthread_atfork'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_memory_alloc':
(.text+0x5e7): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_memory_alloc':
(.text+0x601): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_memory_alloc':
(.text+0x612): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_memory_alloc':
(.text+0x62b): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_shutdown':
(.text+0x7a3): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(memory.o): In function `blas_shutdown':
(.text+0x82e): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_server':
(.text+0x1d9): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_server':
(.text+0x1ea): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_server':
(.text+0x217): undefined reference to `pthread_cond_wait'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_init':
(.text+0x348): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_init':
(.text+0x3df): undefined reference to `pthread_mutex_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_init':
(.text+0x3ea): undefined reference to `pthread_cond_init'
makefile:45: recipe for target 'matmult' failed
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_init':
(.text+0x3fe): undefined reference to `pthread_create'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_init':
(.text+0x42f): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `exec_blas_async':
(.text+0x592): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `exec_blas_async':
(.text+0x5a4): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `exec_blas_async':
(.text+0x5d0): undefined reference to `pthread_cond_signal'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `goto_set_num_threads':
(.text+0x77c): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `goto_set_num_threads':
(.text+0x7df): undefined reference to `pthread_mutex_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `goto_set_num_threads':
(.text+0x7ee): undefined reference to `pthread_cond_init'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `goto_set_num_threads':
(.text+0x80a): undefined reference to `pthread_create'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `goto_set_num_threads':
(.text+0x822): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0x9a6): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa19): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa2a): undefined reference to `pthread_cond_signal'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa36): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa62): undefined reference to `pthread_join'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa86): undefined reference to `pthread_mutex_destroy'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xa93): undefined reference to `pthread_cond_destroy'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(blas_server.o): In function `blas_thread_shutdown_':
(.text+0xab7): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(eh_alloc.o): In function `(anonymous namespace)::pool::free(void*) [clone .constprop.2]':
(.text._ZN12_GLOBAL__N_14pool4freeEPv.constprop.2+0x1d): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(eh_alloc.o): In function `(anonymous namespace)::pool::free(void*) [clone .constprop.2]':
(.text._ZN12_GLOBAL__N_14pool4freeEPv.constprop.2+0xa8): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(eh_alloc.o): In function `(anonymous namespace)::pool::allocate(unsigned long) [clone .constprop.3]':
(.text._ZN12_GLOBAL__N_14pool8allocateEm.constprop.3+0x1d): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(eh_alloc.o): In function `(anonymous namespace)::pool::allocate(unsigned long) [clone .constprop.3]':
(.text._ZN12_GLOBAL__N_14pool8allocateEm.constprop.3+0x83): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale.o): In function `__gnu_cxx::__scoped_lock::~__scoped_lock()':
(.text._ZN9__gnu_cxx13__scoped_lockD2Ev[_ZN9__gnu_cxx13__scoped_lockD5Ev]+0x12): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned long)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEm+0x51): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned long)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEm+0xda): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x43): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x62): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0x44): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0xa9): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<char>::do_open(std::string const&, std::locale const&) const':
(.text._ZNKSt8messagesIcE7do_openERKSsRKSt6locale+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<char>::do_open(std::string const&, std::locale const&) const':
(.text._ZNKSt8messagesIcE7do_openERKSsRKSt6locale+0x10b): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<char>::do_get(int, int, int, std::string const&) const':
(.text._ZNKSt8messagesIcE6do_getEiiiRKSs+0x86): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<char>::do_get(int, int, int, std::string const&) const':
(.text._ZNKSt8messagesIcE6do_getEiiiRKSs+0x100): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<char>::do_get(int, int, int, std::string const&) const':
(.text._ZNKSt8messagesIcE6do_getEiiiRKSs+0x1a9): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_open(std::string const&, std::locale const&) const':
(.text._ZNKSt8messagesIwE7do_openERKSsRKSt6locale+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_open(std::string const&, std::locale const&) const':
(.text._ZNKSt8messagesIwE7do_openERKSsRKSt6locale+0x10b): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt8messagesIwE8do_closeEi+0x37): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt8messagesIwE8do_closeEi+0xaa): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt8messagesIwE8do_closeEi+0x16e): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_get(int, int, int, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt8messagesIwE6do_getEiiiRKSbIwSt11char_traitsIwESaIwEE+0x8e): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_get(int, int, int, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt8messagesIwE6do_getEiiiRKSbIwSt11char_traitsIwESaIwEE+0x108): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members_cow.o): In function `std::messages<wchar_t>::do_get(int, int, int, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt8messagesIwE6do_getEiiiRKSbIwSt11char_traitsIwESaIwEE+0x301): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<char>::do_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&) const':
(.text._ZNKSt7__cxx118messagesIcE7do_openERKNS_12basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<char>::do_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&) const':
(.text._ZNKSt7__cxx118messagesIcE7do_openERKNS_12basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale+0x11c): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<char>::do_get(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
(.text._ZNKSt7__cxx118messagesIcE6do_getEiiiRKNS_12basic_stringIcSt11char_traitsIcESaIcEEE+0x6b): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<char>::do_get(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
(.text._ZNKSt7__cxx118messagesIcE6do_getEiiiRKNS_12basic_stringIcSt11char_traitsIcESaIcEEE+0xe8): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<char>::do_get(int, int, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
(.text._ZNKSt7__cxx118messagesIcE6do_getEiiiRKNS_12basic_stringIcSt11char_traitsIcESaIcEEE+0x1e1): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&) const':
(.text._ZNKSt7__cxx118messagesIwE7do_openERKNS_12basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::locale const&) const':
(.text._ZNKSt7__cxx118messagesIwE7do_openERKNS_12basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale+0x11c): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt7__cxx118messagesIwE8do_closeEi+0x23): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt7__cxx118messagesIwE8do_closeEi+0x92): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_close(int) const':
(.text._ZNKSt7__cxx118messagesIwE8do_closeEi+0x127): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_get(int, int, int, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt7__cxx118messagesIwE6do_getEiiiRKNS_12basic_stringIwSt11char_traitsIwESaIwEEE+0xa6): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_get(int, int, int, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt7__cxx118messagesIwE6do_getEiiiRKNS_12basic_stringIwSt11char_traitsIwESaIwEEE+0x128): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(messages_members.o): In function `std::__cxx11::messages<wchar_t>::do_get(int, int, int, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) const':
(.text._ZNKSt7__cxx118messagesIwE6do_getEiiiRKNS_12basic_stringIwSt11char_traitsIwESaIwEEE+0x2d9): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(condition_variable.o): In function `std::condition_variable::~condition_variable()':
(.text._ZNSt18condition_variableD2Ev+0x1): undefined reference to `pthread_cond_destroy'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(condition_variable.o): In function `std::condition_variable::wait(std::unique_lock<std::mutex>&)':
(.text._ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE+0x8): undefined reference to `pthread_cond_wait'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(condition_variable.o): In function `std::condition_variable::notify_one()':
(.text._ZNSt18condition_variable10notify_oneEv+0x5): undefined reference to `pthread_cond_signal'
/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a(condition_variable.o): In function `std::(anonymous namespace)::notifier::run(void*)':
(.text._ZNSt12_GLOBAL__N_18notifier3runEPv+0x18): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.4':
(.text+0x1662): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
(.text+0x16e7): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases':
(.text+0x17bb): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
(.text+0x185e): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases':
(.text+0x18e6): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
(.text+0x19c6): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
(.text+0x1a16): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE':
(.text+0x1b00): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.4':
(.text+0x1681): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases':
(.text+0x1706): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/x86_64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases':
(.text+0x17da): undefined reference to `pthread_mutex_unlock'
collect2: error: ld returned 1 exit status
make: *** [matmult] Error 1
我将-lpthread
更改为-pthread
并收到以下错误:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormbr.o): In function `dormbr_':
(.text+0x422): undefined reference to `_gfortran_concat_string'
makefile:45: recipe for target 'matmult' failed
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormbr.o): In function `dormbr_':
(.text+0x5f9): undefined reference to `_gfortran_concat_string'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormbr.o): In function `dormbr_':
(.text+0x661): undefined reference to `_gfortran_concat_string'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormbr.o): In function `dormbr_':
(.text+0x6c1): undefined reference to `_gfortran_concat_string'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormlq.o): In function `dormlq_':
(.text+0x2f5): undefined reference to `_gfortran_concat_string'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libblas.a(dormlq.o):(.text+0x75d): more undefined references to `_gfortran_concat_string' follow
collect2: error: ld returned 1 exit status
添加-lgfortran
并没有改变问题。