partyというクラスのヘッダー ファイルがありますparty.h。
#ifndef party_h
#define party_h
#include <iostream>
class party{
private:
    int people;
    int waitTime;
    bool waiting;
    int arrival;
public:
    party();
    party(int, int);
    int getPeople();
    void setPeople(int);
    bool isWaiting();
    void setWaiting(bool);
    void setWaitTime(int);
    int getwaitTime();
    void setArrival(int);
    int getArrival();
    int getTotalTime(int);
    void decrement();
};
#endif
そして、その実装party.cpp:
#include "party.h"
party::party(){}
party::party(int numPeople, int a){
    people = numPeople;
    arrival = a;
}
int party::getPeople(){
    return people;
}
void party::setPeople(int p){
    people = p;
}
bool party::isWaiting(){
    return waiting;
}
void party::setWaiting(bool w){
    waiting = w;
}
void party::setWaitTime(int t){
        waitTime = t;
}
int party::getwaitTime(){
    return waitTime;
}
void party::setArrival(int a){
    arrival =a; 
}
int party::getTotalTime(int current){
    return (current-arrival);
}
プロジェクトをビルドするたびに、以下のエラー メッセージが表示されます。
Ld /Users/shade/Library/Developer/Xcode/DerivedData/ResSim-fvkhqxhiupiizxgffxqgoxgolsmv/Build/Products/Debug/ResSim normal x86_64 cd /Users/shade/Dropbox/School/Gwinnett_Tech/CIST_2362/final/ResSim setenv MACOSX_DEPLOYMENT_TARGET 10.8 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/shade/Library/Developer/Xcode/DerivedData/ResSim-fvkhqxhiupiizxgffxqgoxgolsmv/Build/Products/Debug -F/Users/shade/Library/Developer/Xcode/DerivedData/ResSim-fvkhqxhiupiizxgffxqgoxgolsmv/Build/Products/Debug -filelist /Users/shade/Library/Developer/Xcode/DerivedData/ResSim-fvkhqxhiupiizxgffxqgoxgolsmv/Build/Intermediates/ResSim.build/Debug/ResSim.build/Objects-normal/x86_64/ResSim.LinkFileList -mmacosx-version-min=10.8 -stdlib=libstdc++ -o /Users/shade/Library/Developer/Xcode/DerivedData/ResSim-fvkhqxhiupiizxgffxqgoxgolsmv/Build/Products/Debug/ResSim
Undefined symbols for architecture x86_64: "party::getArrival()", referenced from: restaurant::startSim() in restaurant.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
"party::getArrival()", referenced from: Restaurant::startSim() in restaurant.o Symbol(s) not found for architecture x86_64 Linker command failed with exit code 1 (use -v to see invocation)
これは、Visual Studio で今日/今週末に動作していたため、新しいエラー メッセージです。しかし、それ以来、かなりの量のコードを変更しました。要点のコードは更新されており、私が取り組んでいるものです。私は現在、今夜予定されているプロジェクトのデバッグ/プログラミングを完了することができるように、xcode でビルドしようとしています。どんな助けでも大歓迎です!ありがとう!