Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22198

gcc-11 macOS doesn't compile [duplicate]

$
0
0

I installed gcc-11 with home-brew (brew install gcc) and tried to compile a simple cpp file with gcc-11 -o main main.cpp but I get the following error:

Undefined symbols for architecture x86_64:  "__ZNSt8ios_base4InitC1Ev", referenced from:          __Z41__static_initialization_and_destruction_0ii in ccsPh29E.o. "__ZNSt8ios_base4InitD1Ev", referenced from:      __Z41__static_initialization_and_destruc tion_0ii in ccsPh29E.o. "__ZSt4cout", referenced from:        _main in ccsPh29E.o. "__ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc", referenced from:        _main in ccsPh29E.o. ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status  

How can I fix it? Thanks


Viewing all articles
Browse latest Browse all 22198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>