473,387 Members | 1,290 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

boost with cygwin

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.

Nov 30 '06 #1
5 2686
bl******@gmail.com wrote:
I'm not using the INCLUDES variable as I found all the libraries in the
/usr/lib. Can someone help.
You need both the include directories and the libraries available at
compile time.
Nate
Nov 30 '06 #2
Thanks for your reply I tried that as well

INCLUDES = -I/usr/include/boost-1_33_1
LDFLAGS = -L/usr/lib
LIBS = -lboost_1_33_1

and

$(OBJECTS) : %.o : %.cpp
$(CPP) -c $(CPPFLAGS) $(INCLUDES) $<
Still get the same error ..

Nate Barney wrote:
bl******@gmail.com wrote:
I'm not using the INCLUDES variable as I found all the libraries in the
/usr/lib. Can someone help.

You need both the include directories and the libraries available at
compile time.
Nate
Nov 30 '06 #3
bl******@gmail.com wrote:
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.
[snip]

You should ask this on the Boost Users list
(http://boost.org/more/mailing_lists.htm#users), as platform
configuration issues are off-topic here
(http://www.parashift.com/c++-faq-lit....html#faq-5.9).

Cheers! --M

Nov 30 '06 #4
bl******@gmail.com wrote:
Thanks for your reply I tried that as well
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
Nov 30 '06 #5
bl******@gmail.com wrote:
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
It looks like you have not included the Boost headers in your
source files. You need something like:

#include "boost.h"

at the top of cash_flow.h (I dont' know what the exact file
name you need is; ask on a Boost forum).

Nov 30 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jörg Maier | last post by:
Hey guys, i have a big problem using Tkinter and pexpect in cygwin. i try to program an winscp-like rsync Program for all posix Platforms (linux, macosx, cygwin). i got a class SslConnection...
0
by: dw | last post by:
Pehaba, does anyone knows how to install MySQLdb on cygwin? - test device: MySQLdb 0.9.2.0 targz + cygwin 1.5.7-cr-0x9e + python 2.3.3 on cygwin + mysql 4.0.17 win32 - modified setup.py's...
9
by: Mayer | last post by:
Hello: I'm running python under cygwin and need to find the drive letter. Cygwin has a way of calling my drives by a name relative to the Cygwin directory, so I get things like /home/user rather...
3
by: Manzanita | last post by:
Hi. I'm using boost::numerics::ublas to solve linear symmetric and hermitian systems (cholesky, qr, etc.). I'm aware that ublas only provide basic algebra operations (blas1, blas2 and blas3) so...
4
by: goberle | last post by:
I have installed the Cygwin package under WinXP. I am trying to insure that I have a reasonable development environment, and that things are working properly, by trying to compile and run the...
2
by: 63q2o4i02 | last post by:
Hi, I'm using python 2.4 and windows XP. I have two packages in the windows version of python in site-packages. They are PyVisa and ctypes, and both live in c:\python24\lib\site-packages ...
4
by: reachsamdurai | last post by:
Hello, Can you please let me know the procedure to reach db2 command prompt from a cygwin window (hence without using Start-> Run -> db2cmd method). I'm planning to write shell scripts which...
0
by: dot | last post by:
I spent a few headache filled days trying to use GMP on windows (XP pro) I finally got it to work and since I found little help on the Web I thought someone might find what i did useful. ...
8
by: Ale | last post by:
Hi! I need to compile with "Make" a source written for linux that I need to execute under a Win32 system. I tried to launch Make under cygwin, and it works fine, but it doesn't run under Win32...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.