亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

為什么makefile通過不了?

g++ -o main main.o Person.o Worker.o

ld: warning: ignoring file Person.o, file was built for unsupported file format ( 0x43 0x50 0x43 0x48 0x01 0x0C 0x00 0x00 0xF6 0x09 0x00 0x00 0x0B 0x82 0x67 0x42 ) which is not the architecture being linked (x86_64): Person.o

Undefined symbols for architecture x86_64:

? "Person::Person()", referenced from:

? ? ? Worker::Worker() in Worker.o

? "Person::~Person()", referenced from:

? ? ? Worker::Worker() in Worker.o

? ? ? Worker::~Worker() in Worker.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [all] Error 1


正在回答

2 回答

已經解決了,使用g++ -std=c++11進行編譯就ok了

0 回復 有任何疑惑可以回復我~

這是啥?好蒙...

0 回復 有任何疑惑可以回復我~
#1

Kevin_dgt 提問者

我是用vim寫的,然后用g++編譯的
2016-09-26 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
C++遠征之繼承篇
  • 參與學習       75192    人
  • 解答問題       251    個

繼承,C++面向對象三大特征之一,通過編碼實踐方式講解到操作層面

進入課程

為什么makefile通過不了?

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號