Boost logo

Boost-Build :

From: syed ahmad (naeem_fast_at_[hidden])
Date: 2005-04-11 03:16:21


Hi Volodya,
Thank for response,
I would like to use shared_ptr class, and later filesystem library.
Can I use boost without building it, on solaris 8 with g++ 2.95.3.
I need to know where to copy boost library and
I am using this make to build using g++ compiler

srcdir = .
prefix = /usr/local
incdir = $(prefix)/include
SHELL = /bin/sh
MKDEP_CCINC = -I/opt/sfw/lib/g++-include -I/usr/local/include -I/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include
QUALITAINC = -I/usr/local/boost_1_32_0\
-I/usr/local/boost_1_32_0/boost

OSTYPE = SunOS
CXX = g++
CXXFLAGS = -Wall -D$(OSTYPE) -fexceptions
CC = gcc
CFLAGS = -Wall -DFLEX_IN_USE -DYYTEXT_POINTER -fPIC -D$(OSTYPE) -fexceptions

#--- Linking
LIBS = /usr/local/lib/libstdc++.a
QLIBS = /usr/lib/libz.so

QFILES = $(wildcard *.o)

#----- end of linking
HFILES = $(wildcard *.h)
CPPFILES = $(wildcard *.cpp)
OFILES = $(CPPFILES:.cpp=.o)
TARGET = test
.c.o:
$(CC) -c $(CFLAGS) $(QUALITAINC) $(MKDEP_CCINC) $<
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(MKDEP_CCINC) $(QUALITAINC) $<

$(TARGET): $(OFILES)
$(CXX) $(OFILES) $(LIBS) $(QLIBS) -o $@

$(OFILES): $(HFILES)
install: $(TARGET)
install -c $(TARGET) $(QUALITAHOME)/bin
clean:
rm -f $(OFILES) >/dev/null 2>&1

I am specifying the path also in make file

QUALITAINC = -I/usr/local/boost_1_32_0\
-I/usr/local/boost_1_32_0/boost

The source code is this

#include <map>
#include <shared_ptr.hpp>
using namespace std;
using namespace boost;

class mytest
{
public:
mytest()
{
}
~mytest()
{
bool b = true;
}
};

int main()
{

map<int,shared_ptr<mytest> > m_map1;
shared_ptr<mytest> p(new mytest);
m_map1[1] = p;
m_map1.clear();
return 0;
}

Vladimir Prus <ghost_at_[hidden]> wrote:
On Saturday 09 April 2005 19:33, naeem_fast wrote:
> Hi,
> I am trying to build on solaris 8 using g++ 2.95.3 version of compiler.

Build what? And which version of that?

> I tried to use sh ./configure command, but it fails,

I don't see no 'configure' either in Boost root or in Boost Build root. If you
have that, it must be added by somebody else that Boost developers or
Boost.Build developers, and it's better to ask that somebody. At least, you
need to specify how it fails. What messages do you get?

If you don't have 'configure', then running "sh ./configure" surely fails.

> Do I need to build , Can i able to use the source files without build.

Which source files do you want to use? Many boost libraries don't require the
build step.

- Volodya

-- 
Vladimir Prus
http://vladimir_prus.blogspot.com
Boost.Build V2: http://boost.org/boost-build2
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/jamboost/
To unsubscribe from this group, send an email to:
jamboost-unsubscribe_at_[hidden]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
Send instant messages to your online friends http://uk.messenger.yahoo.com  --0-1554167759-1113207381=:91535 Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
<DIV><FONT face="Courier New">Hi&nbsp;Volodya,</FONT></DIV>
<DIV><FONT face="Courier New">Thank for response, </FONT></DIV>
<DIV><FONT face="Courier New">I would like to use </FONT>shared_ptr class, and later filesystem library.</DIV>
<DIV>Can I use boost without building it, on <FONT face="Courier New">solaris 8&nbsp;with g++ 2.95.3.</FONT></DIV>
<DIV><FONT face="Courier New">I need to know where to copy boost library and </FONT></DIV>
<DIV><FONT face="Courier New">I am using this make to build using g++ compiler</FONT></DIV>
<DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
<DIV>srcdir&nbsp;&nbsp;= .<BR>prefix&nbsp;&nbsp;= /usr/local<BR>incdir&nbsp;&nbsp;= $(prefix)/include</DIV>
<DIV>SHELL&nbsp;&nbsp;= /bin/sh</DIV>
<DIV>MKDEP_CCINC&nbsp;= -I/opt/sfw/lib/g++-include -I/usr/local/include -I/opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/include<BR>QUALITAINC&nbsp;= -I/usr/local/boost_1_32_0\<BR>&nbsp;&nbsp;&nbsp; -I/usr/local/boost_1_32_0/boost<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <BR>OSTYPE&nbsp;&nbsp;= SunOS<BR>CXX&nbsp;&nbsp;= g++ <BR>CXXFLAGS&nbsp;= -Wall&nbsp; -D$(OSTYPE) -fexceptions<BR>CC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = gcc<BR>CFLAGS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = -Wall&nbsp; -DFLEX_IN_USE -DYYTEXT_POINTER -fPIC -D$(OSTYPE) -fexceptions<BR>&nbsp; </DIV>
<DIV>#---&nbsp; Linking<BR>LIBS =&nbsp;&nbsp;/usr/local/lib/libstdc++.a</DIV>
<DIV>QLIBS =&nbsp;/usr/lib/libz.so<BR>&nbsp;<BR>&nbsp; </DIV>
<DIV>QFILES = $(wildcard *.o)<BR>&nbsp;&nbsp;<BR>#-----&nbsp; end of linking </DIV>
<DIV>HFILES = $(wildcard *.h)<BR>CPPFILES = $(wildcard *.cpp)<BR>OFILES = $(CPPFILES:.cpp=.o)</DIV>
<DIV>TARGET = test</DIV>
<DIV>.c.o:<BR>&nbsp;$(CC) -c $(CFLAGS) $(QUALITAINC) $(MKDEP_CCINC) $&lt; <BR>.cpp.o:<BR>&nbsp;$(CXX) -c $(CXXFLAGS) $(MKDEP_CCINC) $(QUALITAINC) $&lt; &nbsp;<BR>&nbsp;<BR>$(TARGET):&nbsp;$(OFILES) <BR>&nbsp;&nbsp;$(CXX) $(OFILES) $(LIBS) $(QLIBS)&nbsp;&nbsp;&nbsp; -o $@&nbsp;<BR>&nbsp; </DIV>
<DIV>$(OFILES): $(HFILES)<BR>install: $(TARGET)<BR>&nbsp; install -c $(TARGET) $(QUALITAHOME)/bin<BR>clean:<BR>&nbsp;rm -f $(OFILES) &gt;/dev/null 2&gt;&amp;1</DIV>
<DIV>&nbsp;</DIV>
<DIV>I am&nbsp;specifying&nbsp;&nbsp;the path also in make file</DIV>
<DIV>&nbsp;</DIV>
<DIV>QUALITAINC&nbsp;= -I/usr/local/boost_1_32_0\<BR>&nbsp;&nbsp;&nbsp; -I/usr/local/boost_1_32_0/boost<BR><BR></DIV>
<DIV>The source code is this</DIV>
<DIV>&nbsp;</DIV>
<DIV>#include &lt;map&gt;<BR>#include &lt;shared_ptr.hpp&gt;</DIV>
<DIV>using namespace std;</DIV>
<DIV>using namespace boost;</DIV>
<DIV>&nbsp;</DIV>
<DIV>class mytest<BR>{<BR>public:<BR>&nbsp;mytest()<BR>&nbsp;{</DIV>
<DIV>&nbsp;}<BR>&nbsp;~mytest()<BR>&nbsp;{<BR>&nbsp;&nbsp;bool b = true;<BR>&nbsp;}<BR>};</DIV>
<DIV>&nbsp;</DIV>
<DIV>int main()<BR>{<BR>&nbsp;&nbsp;&nbsp; <BR>map&lt;int,shared_ptr&lt;mytest&gt; &gt; m_map1;<BR>shared_ptr&lt;mytest&gt; p(new mytest);</DIV>
<DIV>m_map1[1] = p;</DIV>
<DIV>&nbsp; m_map1.clear();<BR>&nbsp;return 0;<BR>}<BR></DIV>
<DIV><BR><BR><B><I>Vladimir Prus &lt;ghost_at_[hidden]&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><TT>On Saturday 09 April 2005 19:33, naeem_fast wrote:<BR>&gt; Hi,<BR>&gt; I am trying to build on solaris 8 using g++ 2.95.3 version of compiler.<BR><BR>Build what? And which version of that?<BR><BR>&gt; I tried to use sh ./configure command, but it fails,<BR><BR>I don't see no 'configure' either in Boost root or in Boost Build root. If you <BR>have that, it must be added by somebody else that Boost developers or <BR>Boost.Build developers, and it's better to ask that somebody. At least, you <BR>need to specify how it fails. What messages do you get?<BR><BR>If you don't have 'configure', then running "sh ./configure" surely fails.<BR><BR>&gt; Do I need to build , Can i able to use the source files without build.<BR><BR>Which source files do you want to use? Many boost libraries don't require the <BR>build step.<BR><BR>- Volodya<BR><BR>-- <BR>Vladimir Prus<BR><A
href="http://vladimir_prus.blogspot.com/">http://vladimir_prus.blogspot.com><BR>Boost.Build V2: http://boost.org/boost-build2<BR></TT></BLOCKQUOTE><p>Send instant messages to your online friends http://uk.messenger.yahoo.com  --0-1554167759-1113207381=:91535-- 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk