search container

Started by
13 comments, last by wintertime 10 years, 7 months ago

Runtime error:

/lin.xpl: undefined symbol: _ZNSt3tr111regex_matchIN9__gnu_cxx17__normal_iteratorIPKcSsEESaINS_9sub_matchIS5_EEEcNS_12regex_traitsIcEEEEbT_SB_RNS_13match_resultsISB_T0_EERKNS_11basic_regexIT1_T2_EESt6bitsetILm11EE

I've included:

#include <tr1/regex>

and gcc:

g++ -fPIC -fvisibility=hidden -std=c++0x

Thanks

Advertisement

you need to link using std=c++11

if you link with std=c++0x some c++11 things are not available, including c++11 threads

and the include is:

#include <regex>

I think the reason for this is simply that c++0x doesn't link against libc++
hope it works

Thanks.

What could I be doing wrong if I get only one airport back. For ex. search for LSZ only returns LSZA but of course there are many more alike LSZH etc.

I've pretty much simply copied Horscht' code.

foundAirports.size() is never more than one.

Thanks

What you did wrong is you copied code before completely understanding what it does.wink.png

You should try running your program line by line in the debugger and look what it does and which values are inside your variables, if your source data is right, if it gets read correctly, if the function finds more than one, if you are using the result correctly.

Otherwise you would need to provide more information for others to help you, but you cant always rely on others debugging your programs.

This topic is closed to new replies.

Advertisement