|
-
February 18th, 2012, 09:46 PM
#1
Boost library
So, I have spent the last week looking googling and researching how to get a standalone copy of the regex part of the boost library to work in a project. This project will be compiled on other machines and I CANNOT have the user install it.
Is there any way to do this?
So far, I have built the regex part: I have both .so files and .a files built. The thing that I'm unsure of is that these were built with gcc and I am using/will be using g++.
I have also finally got the bcp tool to work, and extracted the regex part and all of its dependencies.
I can't get it to compile any way I try to work it. I need this to be in a folder "regex/" folder in my directory.
I have used too many commands to paste them all, but the last I tried was this:
g++ -g -pedantic -Wall -o doit test.C -Iregex/boost/ -Wl,-Lregex/libs/regex/build/gcc/ -static -lboost_regex-gcc-1_47
I have also tried many variations of the above command. Such as using -lboost_regex and lots of other things. Is my whole problem because I'm using an .so built by GCC?
The output of the above command was
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0xb4): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_exception':
(.text.__cxa_allocate_exception+0x111): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_free_exception':
(.text.__cxa_free_exception+0x69): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_free_exception':
(.text.__cxa_free_exception+0x84): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':
(.text.__cxa_allocate_dependent_exception+0x8c): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_allocate_dependent_exception':
(.text.__cxa_allocate_dependent_exception+0xe8): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':
(.text.__cxa_free_dependent_exception+0x74): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(eh_alloc.o): In function `__cxa_free_dependent_exception':
(.text.__cxa_free_dependent_exception+0x8f): undefined reference to `pthread_mutex_unlock'
regex/libs/regex/build/gcc//libboost_regex-gcc-1_47.a(static_mutex.o): In function `boost::scoped_static_mutex_lock::lock()':
static_mutex.cpp .text+0x14): undefined reference to `pthread_mutex_lock'
regex/libs/regex/build/gcc//libboost_regex-gcc-1_47.a(static_mutex.o): In function `boost::scoped_static_mutex_lock::unlock()':
static_mutex.cpp .text+0x64): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale.o): In function `__gnu_cxx::__scoped_lock::~__scoped_lock()':
(.text._ZN9__gnu_cxx13__scoped_lockD2Ev[_ZN9__gnu_cxx13__scoped_lockD5Ev]+0x16): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x41): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale.o): In function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
(.text._ZNSt6locale5_Impl16_M_install_cacheEPKNS_5facetEj+0x73): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x37): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale_init.o): In function `std::locale::locale()':
(.text._ZNSt6localeC2Ev+0x53): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0x36): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libstdc++.a(locale_init.o): In function `std::locale::global(std::locale const&)':
(.text._ZNSt6locale6globalERKS_+0xb7): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_bases':
(.text+0x1794): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_bases':
(.text+0x17ab): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_table_bases':
(.text+0x18ae): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_table_bases':
(.text+0x18c5): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__deregister_frame_info_bases':
(.text+0x198c): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__deregister_frame_info_bases':
(.text+0x19ff): undefined reference to `pthread_mutex_unlock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `_Unwind_Find_FDE':
(.text+0x1aba): undefined reference to `pthread_mutex_lock'
/usr/lib/gcc/i686-linux-gnu/4.6.1/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `_Unwind_Find_FDE':
(.text+0x1b09): undefined reference to `pthread_mutex_unlock'
collect2: ld returned 1 exit status
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|