thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From EY Tsai <ey.t...@comcast.net>
Subject Any idea why build failed on cpp?
Date Tue, 17 Aug 2010 00:22:11 GMT

g++ -o CppClinicClient -I./gen-cpp -I/usr/local/include/thrift -I/usr/include/boost/  -I./
-L/usr/local/lib -lthrift main/CppClinicClient.cpp gen-cpp/petclinic_constants.cpp gen-cpp/petclinic_types.cpp
 gen-cpp/PetClinic.cpp
/tmp/ccSEmUDT.o: In function `std::less<tc_petclinic::Specialty>::operator()(tc_petclinic::Specialty
const&, tc_petclinic::Specialty const&) const':
petclinic_types.cpp:(.text._ZNKSt4lessIN12tc_petclinic9SpecialtyEEclERKS1_S4_[std::less<tc_petclinic::Specialty>::operator()(tc_petclinic::Specialty
const&, tc_petclinic::Specialty const&) const]+0x14): undefined reference to `tc_petclinic::Specialty::operator<(tc_petclinic::Specialty
const&) const'
/tmp/ccSEmUDT.o: In function `std::less<tc_petclinic::Visit>::operator()(tc_petclinic::Visit
const&, tc_petclinic::Visit const&) const':
petclinic_types.cpp:(.text._ZNKSt4lessIN12tc_petclinic5VisitEEclERKS1_S4_[std::less<tc_petclinic::Visit>::operator()(tc_petclinic::Visit
const&, tc_petclinic::Visit const&) const]+0x14): undefined reference to `tc_petclinic::Visit::operator<(tc_petclinic::Visit
const&) const'
/tmp/ccSEmUDT.o: In function `std::less<tc_petclinic::Pet>::operator()(tc_petclinic::Pet
const&, tc_petclinic::Pet const&) const':
petclinic_types.cpp:(.text._ZNKSt4lessIN12tc_petclinic3PetEEclERKS1_S4_[std::less<tc_petclinic::Pet>::operator()(tc_petclinic::Pet
const&, tc_petclinic::Pet const&) const]+0x14): undefined reference to `tc_petclinic::Pet::operator<(tc_petclinic::Pet
const&) const'
collect2: ld returned 1 exit status
make: *** [client] Error 1

petclinic.thrif:

struct PetType {
   1: i32 id,
   2: string name
}

struct Specialty {
   1: i32 id,
   2: string name
}

struct Vet {
   1: i32 id,
   2: string firstName,
   3: string lastName,
   4: set<Specialty>  specialties
}

struct Visit {
   1: i32 id,
   2: i64 date,
   3: string description,
   4: i32 petFK
}

struct Pet {
   1: i32 id,
   2: string name
   3: string birthDate,
   4: PetType type,
   5: set<Visit>  visits,
   6: i32 ownerFK,
   7: i32 typeFK
}

struct Owner {
   1: i32 id,
   2: string firstName,
   3: string lastName
   4: i32 account,
   5: string address,
   6: string city,
   7: string telephone,
   8: set<Pet>  pets
}

service PetClinic {
   void putPetType(1: PetType petType),
   PetType getPetType(1: i32 id),
   void putPet(1: Pet pet),
   Pet getPet(1: i32 id),
   void putVisit(1: Visit visit),
   Visit getVisit(1: i32 id),
   void putOwnerPets(1: i32 ownerId, 2: set<Pet>  pets),
   set<Pet>  getOwnerPets(1: i32 ownerId),
   void putPetVisits(1: i32 petId, 2: set<Visit>  visits),
   set<Visit>  getPetVisits(1: i32 petId),
   void putOwner(1: Owner owner),
   Owner getOwner(1: i32 id)
}

Thanks




Mime
View raw message