Undefined symbols for architecture x86_64: Which architecture should I use?

后端 未结 3 1481
难免孤独
难免孤独 2020-12-05 09:07

I\'m trying to do some really simple stuff in C++, but I can\'t find any information on how to tackle this. Even the book I have just says \"Just compile and run the program

3条回答
  •  失恋的感觉
    2020-12-05 10:07

    The error isn't that it's the wrong architecture, it's that std::cout (and other symbols) isn't defined.

    You should compile and link with g++ not gcc, to automatically link with correct C++ libraries.

提交回复
热议问题