public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* [g++] Problems linking boost.system and boost.regex
@ 2011-02-15 11:58 lampak
  2011-02-15 13:47 ` Greg Chicares
  0 siblings, 1 reply; 3+ messages in thread
From: lampak @ 2011-02-15 11:58 UTC (permalink / raw)
  To: cygwin


Hi. I'm trying to compile on windows one linux app of mine which uses a few
boost libraries. I've got g++ and boost (1.43.0-1) installed through
setup.exe. I use g++ through Eclipse IDE. I've managed to get the program
compiled but I'm getting linking errors. 

Eclipse executes the following command (I've shortened it a bit removing
other libraries than boost and changed the names of files):

g++ -o"result.exe"  ./Alice.o ./Bob.o ./Carol.o ./Dave.o ./Eve.o ./Fran.o
./Gordon.o ./Isaak.o ./Justin.o ./Mallory.o ./Oscar.o ./Peggy.o  
-lboost_regex-mt.dll -lboost_thread-mt.dll -lboost_date_time-mt.dll
-lboost_system-mt.dll

or, as another attempt without ".dll": (the result is exactly the same)
g++ -o"result.exe"  ./Alice.o ./Bob.o ./Carol.o ./Dave.o ./Eve.o ./Fran.o
./Gordon.o ./Isaak.o ./Justin.o ./Mallory.o ./Oscar.o ./Peggy.o
-lboost_regex-mt -lboost_thread-mt -lboost_date_time-mt -lboost_system-mt

or one more attempt, the same result again, with both ".dll" and without:
g++ -o"result.exe"  ./Alice.o ./Bob.o ./Carol.o ./Dave.o ./Eve.o ./Fran.o
./Gordon.o ./Isaak.o ./Justin.o ./Mallory.o ./Oscar.o ./Peggy.o  
-lboost_regex-mt.dll -lboost_thread-mt.dll -lboost_date_time-mt.dll
-lboost_system-mt.dll -lboost_regex-mt -lboost_thread-mt
-lboost_date_time-mt -lboost_system-mt

I don't get messages that libraries were not found which means they were. 

The errors related to boost.system are: 

/cygdrive/d/libs/include/boost/system/error_code.hpp:214: undefined
reference to `boost::system::generic_category()'
/cygdrive/d/libs/include/boost/system/error_code.hpp:215: undefined
reference to `boost::system::generic_category()'
/cygdrive/d/libs/include/boost/system/error_code.hpp:216: undefined
reference to `boost::system::system_category()'

(I don't actually use boost.system in my program, but from the errors I
guess I need to link it anyway)

Those suggesting something's wrong with regex are even more peculiar: 

./Fran.o:Fran.cpp:(.text$_ZN5boost11basic_regexIcNS_12regex_traitsIcNS_14c_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char,
boost::regex_traits<char, boost::c_regex_traits<char> > >::assign(char
const*, char const*, unsigned int)]+0x22): undefined reference to
`boost::basic_regex<char, boost::regex_traits<char,
boost::c_regex_traits<char> > >::do_assign(char const*, char const*,
unsigned int)'
./Fran.o:Fran.cpp:(.text$_ZN5boost9re_detail12perl_matcherIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS6_EEENS_12regex_traitsIcNS_14c_regex_traitsIcEEEEEC1ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_Oscar12_match_flagsES6_[boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char
const*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
> > > >, boost::regex_traits<char, boost::c_regex_traits<char> >
>::perl_matcher(__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::match_results<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >
>&, boost::basic_regex<char, boost::regex_traits<char,
boost::c_regex_traits<char> > > const&, boost::regex_Oscar::_match_flags,
__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >)]+0xd0): undefined
reference to
`boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >
>, boost::regex_traits<char, boost::c_regex_traits<char> >
>::construct_init(boost::basic_regex<char, boost::regex_traits<char,
boost::c_regex_traits<char> > > const&, boost::regex_Oscar::_match_flags)'
./Fran.o:Fran.cpp:(.text$_ZN5boost12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcNS_14c_regex_traitsIcEEEEEEbT_SD_RNS_13match_resultsISD_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_Oscar12_match_flagsESD_[bool
boost::regex_search<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >
>, char, boost::regex_traits<char, boost::c_regex_traits<char> >
>(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
boost::match_results<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >
>&, boost::basic_regex<char, boost::regex_traits<char,
boost::c_regex_traits<char> > > const&, boost::regex_Oscar::_match_flags,
__gnu_cxx::__normal_iterator<char const*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >)]+0x72): undefined
reference to
`boost::re_detail::perl_matcher<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > >,
std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >
>, boost::regex_traits<char, boost::c_regex_traits<char> > >::find()'

Anyone knows what I'm doing wrong? 

(And BTW, what's the difference between libraries ending with .dll.a and .a
alone? And what does -mt stand for?)
-- 
View this message in context: http://old.nabble.com/-g%2B%2B--Problems-linking-boost.system-and-boost.regex-tp30930187p30930187.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [g++] Problems linking boost.system and boost.regex
  2011-02-15 11:58 [g++] Problems linking boost.system and boost.regex lampak
@ 2011-02-15 13:47 ` Greg Chicares
  2011-02-15 13:58   ` lampak
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Chicares @ 2011-02-15 13:47 UTC (permalink / raw)
  To: cygwin

On 2011-02-15 11:57Z, lampak wrote:
> 
> Hi. I'm trying to compile on windows one linux app of mine which uses a few
> boost libraries. I've got g++ and boost (1.43.0-1) installed through
> setup.exe. I use g++ through Eclipse IDE. I've managed to get the program
> compiled but I'm getting linking errors. 

Last I heard, boost lost its Cygwin maintainer; and old libraries aren't
likely to work with a newer compiler. This page
  http://cygwin.com/packages/boost-devel/boost-devel-1.43.0-1
confirms that:
  "boost-devel: Obsolete package (installed binaries and support files)"
so try building boost yourself.

> (And BTW, what's the difference between libraries ending with .dll.a and .a
> alone?

'.dll.a' is a convention for naming import libraries.

> And what does -mt stand for?)

AFAICR that library-name suffix meant multithreaded.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [g++] Problems linking boost.system and boost.regex
  2011-02-15 13:47 ` Greg Chicares
@ 2011-02-15 13:58   ` lampak
  0 siblings, 0 replies; 3+ messages in thread
From: lampak @ 2011-02-15 13:58 UTC (permalink / raw)
  To: cygwin



Greg Chicares-2 wrote:
> 
> Last I heard, boost lost its Cygwin maintainer; and old libraries aren't
> likely to work with a newer compiler. This page
>   http://cygwin.com/packages/boost-devel/boost-devel-1.43.0-1
> confirms that:
>   "boost-devel: Obsolete package (installed binaries and support files)"
> so try building boost yourself.
> 
According to http://cygwin.com/packages/, the package "boost-devel" is
obsolete - but I'm using "libboost-devel" which is not.

But I will try building boost myself. Only the last time I had some problems
with it (when I ran "bjam --toolset=gcc" I got plenty of "access denied"
messages - I don't know access to what they meant). I will try again and
bother you with more details later ;)
-- 
View this message in context: http://old.nabble.com/-g%2B%2B--Problems-linking-boost.system-and-boost.regex-tp30930187p30931089.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-15 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-15 11:58 [g++] Problems linking boost.system and boost.regex lampak
2011-02-15 13:47 ` Greg Chicares
2011-02-15 13:58   ` lampak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).