Boost logo

Boost Users :

From: scleary_at_[hidden]
Date: 2003-04-04 14:19:16


Your error message indicates that exceptions are disabled. Try not
disabling them. I think some versions of GCC might disable exceptions by
default based on the language its compiling for -- e.g., if it's invoked as
'gcc' or the filename extension designates a C file. I didn't see this
behaviour under Cygwin, though.

I can get it to compile under Cygwin just by adding the Boost include with
-I and defining __linux__ with -D.

HTH,
        -Steve

> -----Original Message-----
> From: Jon Agiato [mailto:JonAgiato_at_[hidden]]
> Sent: Friday, April 04, 2003 11:56 AM
> To: Boost-Users_at_[hidden]
> Subject: RE: [Boost-Users] Please, please help!!!
>
>
> Hi Steve,
> Thanks again for the help. I did that and now the
> file is recognized, but I am receiving the following
> error upon compilation:
>
> In file included from main.cpp:3:
> /usr/include/c++/3.2/boost/libs/random/random_device.cpp:
> In member function
> `void boost::random_device::impl::error(const
> std::string&)':
> /usr/include/c++/3.2/boost/libs/random/random_device.cpp:92:
> exception handling
> disabled, use -fexceptions to enable
> gmake: *** [main.o] Error 1
>
> The program is the same except now I am including
> #include <boost/libs/random/random_device.cpp>.
>
> Thanks again!
>
> Jon Agiato
> JonAgiato_at_[hidden]
>
> --- Jon Agiato <jonagiato_at_[hidden]> wrote:
>
> >>
> >> ----- Original Message -----
> >> From: scleary_at_[hidden]
> >> To: Boost-Users_at_[hidden]
> >> Sent: Friday, April 04, 2003 10:49 AM
> >> Subject: RE: [Boost-Users] Please, please help!!!
> >> boost::random_device
> >>
> >>
> >> There is a source file under the libs/random
> >> directory that contains the
> >> implementation of random_device. You'll have to
> >> include it in your project
> >> in order to link.
> >>
> >> -Steve
> >>
> >
> >
> >>> > -----Original Message-----
> >>> > From: Jon Agiato [mailto:JonAgiato_at_[hidden]]
> >>> > Sent: Thursday, April 03, 2003 10:02 PM
> >>> > To: Boost-Users_at_[hidden]
> >>> > Subject: [Boost-Users] Please, please help!!!
> >>
> >>
> >> boost::random_device
> >
> >
> >>> >
> >>> >
> >>> > Hello all,
> >>> >
> >>> > I am attempting to use the non-deterministic
> >>
> >>
> >> random number generator
> >
> >
> >>> > class contined in boost::random and have
> >>
> >>
> >> encountered the following
> >
> >
> >>> > errors upon running the program. The program does
> >>
> >>
> >> compile without
> >
> >
> >>> > errors, and I am using KDevelop 2.1.3 in the
> >>
> >>
> >> RedHat Linux 8.0
> >
> >
> >>> > environment.
> >>> >
> >>> > Here's the offending code:
> >>> >
> >>> > #include <iostream>
> >>> > #include <cstdlib>
> >>> > #include <boost/nondet_random.hpp>
> >>> >
> >>> > int main()
> >>> > {
> >>> > boost::random_device dev;
> >>> >
> >>> > return EXIT_SUCCESS;
> >>> > }
> >>> >
> >>> > I receive the following error message:
> >>> > /home/JAgiato/boosttest/boosttest/main.cpp:6:
> >>
> >>
> >> undefined reference to
> >
> >
> >>> > `boost::random_device::default_token'
> >>> > /home/JAgiato/boosttest/boosttest/main.cpp:6:
> >>
> >>
> >> undefined reference to
> >
> >
> >>> >
> >>
> >>
> >>
> >
> >
> `boost::random_device::random_device[in-charge](std::basic_str
>
> >> > ing<char,
> >> > std::char_traits<char>, std::allocator<char> >
> >
> >
> > const&)'
>
> >> > /home/JAgiato/boosttest/boosttest/main.cpp:8:
> >
> >
> > undefined reference to
>
> >> > `boost::random_device::~random_device
> >
> >
> > [in-charge]()'
>
> >> >
> >> > My goal is to use this class to produce
> >
> >
> > non-deterministic 32 bit
>
> >> > integers which will be streamed to a binary file.
> >
> >
> > Any help is greatly
>
> > > apprechiated! Thank you!
> > >
> > > Jon Agiato
> > > JonAgiato_at_[hidden]
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Get 128 Bit SSL Encryption!
> http://us.click.yahoo.com/xaxhjB/hdqFAA/VygGAA/EbFolB/TM
> --------------------------------------------------------------
> -------~->
>
> Info: <http://www.boost.org>
> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl>
> Unsubscribe: <mailto:boost-users-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net