Hello,
I'm having a problem with my FOXBoard program.
I'm using pthread and c++ to make an application.
I have a dilema...
I put:
OPTIONS = -static
and REMOVE from the makefile:
LDFLAGS += lpthread -D_REENTRANT
and it compiles well, but when i try to run it on the FOX, it says
the libstdc++.so.5 is missing.
I know that it is missing because the removal of the static option,
but if i leave both statements, it can't compile because it
complains:
---> undefined reference to 'pthread_join'
So, it isn't linking the pthread library although it is there in the
LDFLAGS!!
the complete Makefile is this one:
--------------------------
AXIS_USABLE_LIBS = GLIBC
include $(AXIS_TOP_DIR)/tools/build/Rules.axis
PROGS = AFMApp
INSTMODE = 0755
INSTOWNER = root
INSTGROUP = root
OBJS = AFMApp.o Sensor.o Mux.o Led.o I2C.o Helper.o E2PRom.o lcd.o
ReportSender.o AFMController.o BoxController.o ComputerController.o
ControllerOfUserInterface.o
OPTIONS = -static
LDFLAGS += -lpthread -D_REENTRANT
all: $(PROGS)
$(PROGS): $(OBJS)
#$(CXX) $(LDFLAGS) $^ $(LDLIBS) -o $@
$(CXX) $(OPTIONS) $(LDFLAGS) $^ $(LDLIBS) -o $@
cris-strip $(PROGS)
clean:
rm -f $(PROGS) *.o core
I'm stuck in here and i've tried to find the libstdc++.so.5 and put
it on the FOX but maybe the library isn't the right one!! and the
forum is saying that compiling with static solves this problem.
Can anyone give me a clue about this?
Maybe a working makefile with both contents(lpthreads and static)
could give me a clue?
Thank you very much to you all.
My best regards,
Nuno