[g++] Problems linking boost.system and boost.regex

2011-02-15 Thread lampak

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++ -oresult.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++ -oresult.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++ -oresult.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_traitsIcE6assignEPKcS7_j[boost::basic_regexchar,
boost::regex_traitschar, boost::c_regex_traitschar  ::assign(char
const*, char const*, unsigned int)]+0x22): undefined reference to
`boost::basic_regexchar, boost::regex_traitschar,
boost::c_regex_traitschar  ::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_traitsIcEC1ES6_S6_RNS_13match_resultsIS6_S9_EERKNS_11basic_regexIcSD_EENS_15regex_Oscar12_match_flagsES6_[boost::re_detail::perl_matcher__gnu_cxx::__normal_iteratorchar
const*, std::basic_stringchar, std::char_traitschar, std::allocatorchar
 , std::allocatorboost::sub_match__gnu_cxx::__normal_iteratorchar
const*, std::basic_stringchar, std::char_traitschar, std::allocatorchar
   , boost::regex_traitschar, boost::c_regex_traitschar 
::perl_matcher(__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar  ,
__gnu_cxx::__normal_iteratorchar const*, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  ,
boost::match_results__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar  ,
std::allocatorboost::sub_match__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar
, boost::basic_regexchar, boost::regex_traitschar,
boost::c_regex_traitschar   const, boost::regex_Oscar::_match_flags,
__gnu_cxx::__normal_iteratorchar const*, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  )]+0xd0): undefined
reference to
`boost::re_detail::perl_matcher__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar  ,
std::allocatorboost::sub_match__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar   
, boost::regex_traitschar, boost::c_regex_traitschar 
::construct_init(boost::basic_regexchar, boost::regex_traitschar,
boost::c_regex_traitschar   const, boost::regex_Oscar::_match_flags)'
./Fran.o:Fran.cpp:(.text$_ZN5boost12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcNS_14c_regex_traitsIcEEbT_SD_RNS_13match_resultsISD_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_Oscar12_match_flagsESD_[bool
boost::regex_search__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar  ,
std::allocatorboost::sub_match__gnu_cxx::__normal_iteratorchar const*,
std::basic_stringchar, std::char_traitschar, std::allocatorchar   
, char, boost::regex_traitschar, boost::c_regex_traitschar 
(__gnu_cxx::__normal_iteratorchar const*, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  ,
__gnu_cxx::__normal_iteratorchar const*, std::basic_stringchar,
std::char_traitschar, std::allocatorchar  ,
boost::match_results__gnu_cxx::__normal_iteratorchar 

Re: [g++] Problems linking boost.system and boost.regex

2011-02-15 Thread Greg Chicares
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



Re: [g++] Problems linking boost.system and boost.regex

2011-02-15 Thread lampak


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