C++11 program link failure under GCC 4.8.2-1

Yucong Sun sunyucong@gmail.com
Mon Nov 11 21:17:00 GMT 2013


Hi,

I'm trying to compile a program under cygwin with latest gcc 4.8.2,
the program compiles fine, but link failed. I'm suspecting this has
something todo with libstdc++ but I couldn't find any document on how
to check libstdc++ version (cygwin setup claim it is version 4.8.2
already).

Your help is very appericated!

make[1]: [driver.exe] Error 1 (ignored)
g++ -rdynamic -fno-omit-frame-pointer -D_GNU_SOURCE -march=native  -O3 -g -gdwar
f-2 -std=gnu++0x -flto grammar.tab.o lex.o main.o rc.o interpret.o simulate.o fi
le.o object.o backend.o array.o mapping.o comm.o ed.o regexp.o buffer.o crc32.o
malloc.o mallocwrapper.o class.o efuns_main.o efuns_port.o call_out.o otable.o d
umpstat.o stralloc.o hash.o port.o reclaim.o parse.o simul_efun.o sprintf.o prog
ram.o compiler.o avltree.o icode.o trees.o generate.o scratchpad.o socket_efuns.
o socket_ctrl.o eoperators.o socket_err.o md.o disassembler.o uvalarm.o replace_
program.o master.o function.o debug.o crypt.o applies_table.o add_action.o eval.
o fliconv.o console.o posix_timers.o event.o dns.o packages/*.o `./dtrace_compil
e` -o driver.exe -lcrypt        -levent -L/usr/local/lib
Cannot export _ZNSt10_HashtableIP8object_sSt4pairIKS1_xESaIS4_ENSt8__detail10_Se
lect1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_rang
ed_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb0EEEE10_M_e
mplaceIJS2_IS1_xEEEENS6_14_Node_iteratorIS4_Lb0ELb0EEESt17integral_constantIbLb0
EEDpOT_: symbol wrong type (4 vs 3)
Cannot export _ZNSt10_HashtableIP8object_sSt4pairIKS1_xESaIS4_ENSt8__detail10_Se
lect1stESt8equal_toIS1_ESt4hashIS1_ENS6_18_Mod_range_hashingENS6_20_Default_rang
ed_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb0EEEE16_M_a
llocate_nodeIJS2_IS1_xEEEEPNS6_10_Hash_nodeIS4_Lb0EEEDpOT_: symbol wrong type (4
 vs 3)
Cannot export _ZNSt10_HashtableIxSt4pairIKxP14pending_call_sESaIS4_ENSt8__detail
10_Select1stESt8equal_toIxESt4hashIxENS6_18_Mod_range_hashingENS6_20_Default_ran
ged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE10_M_
emplaceIJS0_IxS3_EEEES0_INS6_14_Node_iteratorIS4_Lb0ELb0EEEbESt17integral_consta
ntIbLb1EEDpOT_: symbol wrong type (4 vs 3)
Cannot export _ZNSt10_HashtableIxSt4pairIKxP14pending_call_sESaIS4_ENSt8__detail
10_Select1stESt8equal_toIxESt4hashIxENS6_18_Mod_range_hashingENS6_20_Default_ran
ged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb0ELb0ELb1EEEE16_M_
allocate_nodeIJS0_IxS3_EEEEPNS6_10_Hash_nodeIS4_Lb0EEEDpOT_: symbol wrong type (
4 vs 3)
Cannot export _ZNSt13_Rb_tree_nodeISt4pairIK8svalue_sSt5dequeIPS1_SaIS4_EEEEC1IJ
S7_EEEDpOT_: symbol wrong type (4 vs 3)
Cannot export _ZNSt5dequeIP10tick_eventSaIS1_EE16_M_push_back_auxIJRKS1_EEEvDpOT
_: symbol wrong type (4 vs 3)
Cannot export _ZNSt5dequeIP8svalue_sSaIS1_EE12emplace_backIJS1_EEEvDpOT_: symbol
 wrong type (4 vs 3)
Cannot export _ZNSt5dequeIP8svalue_sSaIS1_EE16_M_push_back_auxIJS1_EEEvDpOT_: sy
mbol wrong type (4 vs 3)
Cannot export _ZNSt8_Rb_treeI8svalue_sSt4pairIKS0_St5dequeIPS0_SaIS4_EEESt10_Sel
ect1stIS7_E21unique_svalue_compareSaIS7_EE14_M_create_nodeIJS7_EEEPSt13_Rb_tree_
nodeIS7_EDpOT_: symbol wrong type (4 vs 3)
Cannot export _ZNSt8_Rb_treeIlSt4pairIKlP10tick_eventESt10_Select1stIS4_ESt4less
IlESaIS4_EE14_M_create_nodeIJS0_IlS3_EEEEPSt13_Rb_tree_nodeIS4_EDpOT_: symbol wr
ong type (4 vs 3)
collect2: error: ld returned 1 exit status
Makefile:103: recipe for target 'driver.exe' failed
make[1]: *** [driver.exe] Error 1
make[1]: Leaving directory '/home/sunyc/fluffos/src'
Makefile:77: recipe for target 'all' failed
make: *** [all] Error 2

--

Cheers

--
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



More information about the Cygwin mailing list