B
blackfin
Hi,
I'm trying to use boost in a cygwin enviroment. I've installed the
boost-1_33_1 libraries using the cygwin setup program. I have a
makefile to compile a simple program but I keep getting the error.
$ make
g++ -c -O3 cash_flow.cpp
In file included from cash_flow.cpp:6:
cash_flow.h:12: error: `boost' has not been declared
cash_flow.h:12: error: ISO C++ forbids declaration of `shared_ptr' with
no type
cash_flow.h:12: error: expected `;' before '<' token
make: *** [cash_flow.o] Error 1
I'm new to Unix like environments and am not able to setup the makefile
properly. Below is what I have
TARGET = main
CPP = g++
CPPFLAGS = -O3
INCLUDES = -I/usr/include/boost-1_33_1
LDFLAGS =
LIBS = -lboost_1_33_1
SOURCES = $(wildcard *.cpp)
DEPENDS = $(SOURCES:%.cpp=%.d)
OBJECTS = $(DEPENDS:%.d=%.o)
TMPS = $(wildcard *.hpp~) $(wildcard *.cpp~)
$(TARGET) : $(OBJECTS)
$(CPP) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
clean :
rm -rf $(TARGET) $(DEPENDS) $(OBJECTS) $(TMPS)
$(DEPENDS) : %.d : %.cpp
set -e; $(CPP) -MM $(CPPFLAGS) $< \
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
[ -s $@ ] || rm -f $@
$(OBJECTS) : %.o : %.cpp
$(CPP) -c $(CPPFLAGS) $<
..PHONY : clean
include $(DEPENDS)
I'm not using the INCLUDES variable as I found all the libraries in the
/usr/lib. Can someone help.
Thanks
S.
I'm trying to use boost in a cygwin enviroment. I've installed the
boost-1_33_1 libraries using the cygwin setup program. I have a
makefile to compile a simple program but I keep getting the error.
$ make
g++ -c -O3 cash_flow.cpp
In file included from cash_flow.cpp:6:
cash_flow.h:12: error: `boost' has not been declared
cash_flow.h:12: error: ISO C++ forbids declaration of `shared_ptr' with
no type
cash_flow.h:12: error: expected `;' before '<' token
make: *** [cash_flow.o] Error 1
I'm new to Unix like environments and am not able to setup the makefile
properly. Below is what I have
TARGET = main
CPP = g++
CPPFLAGS = -O3
INCLUDES = -I/usr/include/boost-1_33_1
LDFLAGS =
LIBS = -lboost_1_33_1
SOURCES = $(wildcard *.cpp)
DEPENDS = $(SOURCES:%.cpp=%.d)
OBJECTS = $(DEPENDS:%.d=%.o)
TMPS = $(wildcard *.hpp~) $(wildcard *.cpp~)
$(TARGET) : $(OBJECTS)
$(CPP) -o $@ $(LDFLAGS) $(OBJECTS) $(LIBS)
clean :
rm -rf $(TARGET) $(DEPENDS) $(OBJECTS) $(TMPS)
$(DEPENDS) : %.d : %.cpp
set -e; $(CPP) -MM $(CPPFLAGS) $< \
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
[ -s $@ ] || rm -f $@
$(OBJECTS) : %.o : %.cpp
$(CPP) -c $(CPPFLAGS) $<
..PHONY : clean
include $(DEPENDS)
I'm not using the INCLUDES variable as I found all the libraries in the
/usr/lib. Can someone help.
Thanks
S.