Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Cannot Reproduce
-
0.9
-
None
-
Fedora 19
g++ (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)
Description
When I compile:
d.thrift
struct Ala { 1: optional i32 a } struct Basia { 1: optional map<Ala, i32> b }
main.cpp
#include <iostream> #include "gen-cpp/d_types.h" int main() { Basia b; return 0; }
makefile
GEN_SRC := main.cpp\ gen-cpp/d_constants.cpp \ gen-cpp/d_types.cpp \ GEN_OBJ := $(patsubst %.cpp,%.o, $(GEN_SRC)) THRIFT_DIR := /usr/local/include/thrift BOOST_DIR := /usr/local/include INC := -I$(THRIFT_DIR) -I$(BOOST_DIR) .PHONY: all clean all: main %.o: %.cpp $(CXX) --std=c++11 -Wall -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H $(INC) -c $< -o $@ main: main.o $(GEN_OBJ) $(CXX) $^ -o $@ -L/usr/local/lib -lthrift clean: $(RM) *.o gen-cpp/*.o main
I get an error:
g++ main.o gen-cpp/d_constants.o gen-cpp/d_types.o -o main -L/usr/local/lib -lthrift gen-cpp/d_types.o: In function `std::less<Ala>::operator()(Ala const&, Ala const&) const': d_types.cpp:(.text._ZNKSt4lessI3AlaEclERKS0_S3_[_ZNKSt4lessI3AlaEclERKS0_S3_]+0x14): undefined reference to `Ala::operator<(Ala const&) const' collect2: error: ld returned 1 exit status
Attachments
Issue Links
- relates to
-
THRIFT-2717 C++V2 generator/library
- Open