Solved Undefined reference to `std::tr1::__detail::__prime_list'

Cataclismo

New Member


Messages: 3

Hi,
I am experiencing some problems during compiling a binary with G++ 4.8.
I am using FreeBSD 9.2-RELEASE x64.
Those are the errors I get (multiple times):
Code:
OBJDIR/pvp.o: In function `lower_bound<long unsigned int const*, float>':
/usr/local/lib/gcc48/include/c++/bits/stl_algobase.h:965: undefined reference to `std::tr1::__detail::__prime_list'
OBJDIR/pvp.o: In function `_Prime_rehash_policy':
/usr/local/lib/gcc48/include/c++/tr1/hashtable_policy.h:384: undefined reference to `std::tr1::__detail::__prime_list'
OBJDIR/target.o: In function `_M_insert<const boost::intrusive_ptr<event>&>':
/usr/local/lib/gcc48/include/c++/bits/stl_list.h:1562: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)'
My makefile (important things):
Code:
CC = g++48

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = OBJDIR
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

LIBS = -pthread -lm -lmd

CFLAGS = -g -Wall -O2 -pipe -fexceptions -D_THREAD_SAFE -DNDEBUG -mtune=native -fstack-protector-all -std=c++11

TARGET  = $(BINDIR)/binary

CFILE = (the .c files)
CPPFILE = (the .cpp files)

COBJS   = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS   = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)

MAINOBJ = $(OBJDIR)/main.o
MAINCPP = main.cpp

$(TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
   @echo linking $(TARGET)....
   @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(TARGET)
I can't provide you the code which generate errors because I don't know what codes does that. Sorry.
I appreciate. Thanks.
 
Top