Results 1 to 12 of 12
  1. #1
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6

    [HELP] Complieing Boost with vc2010

    I've seem to have a issue complieing boost_1_45_0..

    Any one have any suggestions into why this is happenning with the precomplied headers...

    Code:
    c:\program files\boost\boost_1_45_0\boost\thread\win32\basic_timed_mutex.hpp(149): error C2679: binary '+' : no operator found which takes a right-hand operand of type 'const bool' (or there is no acceptable conversion)
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/posix_time/date_duration_operators.hpp(31): could be 'boost::posix_time::ptime boost::posix_time::operator +(const boost::posix_time::ptime &,const boost::gregorian::months &)' [found using argument-dependent lookup]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/date_duration_types.hpp(132): or       'boost::gregorian::date boost::date_time::months_duration<base_config>::operator +(const boost::gregorian::date &,const boost::date_time::months_duration<base_config> &)' [found using argument-dependent lookup]
    1>          with
    1>          [
    1>              base_config=boost::gregorian::greg_durations_config
    1>          ]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/posix_time/date_duration_operators.hpp(75): or       'boost::posix_time::ptime boost::posix_time::operator +(const boost::posix_time::ptime &,const boost::gregorian::years &)' [found using argument-dependent lookup]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/date_duration_types.hpp(244): or       'boost::gregorian::date boost::date_time::years_duration<base_config>::operator +(const boost::gregorian::date &,const boost::date_time::years_duration<base_config> &)' [found using argument-dependent lookup]
    1>          with
    1>          [
    1>              base_config=boost::gregorian::greg_durations_config
    1>          ]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/time.hpp(139): or       'boost::posix_time::ptime boost::date_time::base_time<T,time_system>::operator +(const boost::gregorian::date_duration &) const'
    1>          with
    1>          [
    1>              T=boost::posix_time::ptime,
    1>              time_system=boost::posix_time::posix_time_system
    1>          ]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/date_time/time.hpp(159): or       'boost::posix_time::ptime boost::date_time::base_time<T,time_system>::operator +(const boost::posix_time::time_duration &) const'
    1>          with
    1>          [
    1>              T=boost::posix_time::ptime,
    1>              time_system=boost::posix_time::posix_time_system
    1>          ]
    1>          while trying to match the argument list '(boost::system_time, const bool)'
    1>          C:\Program Files\Boost\boost_1_45_0\boost/thread/locks.hpp(427) : see reference to function template instantiation 'bool boost::detail::basic_timed_mutex::timed_lock<TimeDuration>(const Duration &)' being compiled
    1>          with
    1>          [
    1>              TimeDuration=bool,
    1>              Duration=bool
    1>          ]
    1>          C:\Program Files\Boost\boost_1_45_0\boost/thread/locks.hpp(307) : see reference to function template instantiation 'bool boost::unique_lock<Mutex>::timed_lock<TimeDuration>(const TimeDuration &)' being compiled
    1>          with
    1>          [
    1>              Mutex=boost::mutex,
    1>              TimeDuration=bool
    1>          ]
    1>          ..\Common\logging.cpp(7) : see reference to function template instantiation 'boost::unique_lock<Mutex>::unique_lock<bool>(Mutex &,const TimeDuration &)' being compiled
    1>          with
    1>          [
    1>              Mutex=boost::mutex,
    1>              TimeDuration=bool
    1>          ]
    Thankyou for your help....

  2. #2
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    what's boost? =/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  3. #3
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6

  4. #4
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Whats boost for

  5. #5
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Isn't there a precompiled library you can just link to instead of trying to compile your own?

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  6. #6
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6
    Quote Originally Posted by whit View Post
    Whats boost for
    The Boost C++ Libraries are a collection of free libraries that extend the functionality of C++.


    Quote Originally Posted by whit View Post
    Isn't there a precompiled library you can just link to instead of trying to compile your own?
    Ya i figured it out.

    Boost C++ Libraries Installers for Windows - BoostPro Computing

    Best and easyier way then going thru them all and complieing them like you said.

  7. #7
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,159
    Reputation
    490
    Thanks
    2,253
    Im pretty sure why posted the post about the precompiled library ..
    either that or im stoned

  8. #8
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6
    I still cant manage to complie some simple code..

    Heres my source..

    Code:
    #include <boost/thread.hpp>
    #include <boost/bind.hpp>
    #include <boost/thread/condition.hpp>
    
    class ReadWriteMutex : boost::noncopyable
    {
    public:
        ReadWriteMutex() :
            m_readers(0),
            m_pendingWriters(0),
            m_currentWriter(false)
        {}
    
        class ScopedReadLock : boost::noncopyable
        {
        public:
            ScopedReadLock(ReadWriteMutex& rwLock) :
                m_rwLock(rwLock)
            {
                m_rwLock.acquireReadLock();
            }
    
            ~ScopedReadLock()
            {
                m_rwLock.releaseReadLock();
            }
    
        private:
            ReadWriteMutex& m_rwLock;
        };
    
        class ScopedWriteLock : boost::noncopyable
        {
        public:
            ScopedWriteLock(ReadWriteMutex& rwLock) :
                m_rwLock(rwLock)
            {
                m_rwLock.acquireWriteLock();
            }
    
            ~ScopedWriteLock()
            {
                m_rwLock.releaseWriteLock();
            }
    
        private:
            ReadWriteMutex& m_rwLock;
        };
    
        void acquireReadLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
    
            while(m_pendingWriters != 0 || m_currentWriter)
            {
                m_writerFinished.wait(lock);
            }
            ++m_readers;
        }
    
        void releaseReadLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
            --m_readers;
    
            if(m_readers == 0)
            {
                m_noReaders.notify_all();
            }
        }
    
        void acquireWriteLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
    
            ++m_pendingWriters;
            
            while(m_readers > 0)
            {
                m_noReaders.wait(lock);
            }
    
            while(m_currentWriter)
            {
                m_writerFinished.wait(lock);
            }
            --m_pendingWriters;
            m_currentWriter = true;
        }
    
        void releaseWriteLock()
        {        
            boost::mutex::scoped_lock lock(m_mutex);
            m_currentWriter = false;
            m_writerFinished.notify_all();
        }
    
    private:
        boost::mutex m_mutex;
    
        unsigned int m_readers;
        boost::condition m_noReaders;
    
        unsigned int m_pendingWriters;
        bool m_currentWriter;
        boost::condition m_writerFinished;
    };
    Still wont complie gives me the crap that i posted first....

  9. #9
    .::SCHiM::.'s Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    733
    Reputation
    180
    Thanks
    880
    My Mood
    Twisted
    Quote Originally Posted by faceofdevil View Post
    I still cant manage to complie some simple code..

    Heres my source..

    Code:
    #include <boost/thread.hpp>
    #include <boost/bind.hpp>
    #include <boost/thread/condition.hpp>
    
    class ReadWriteMutex : boost::noncopyable
    {
    public:
        ReadWriteMutex() :
            m_readers(0),
            m_pendingWriters(0),
            m_currentWriter(false)
        {}
    
        class ScopedReadLock : boost::noncopyable
        {
        public:
            ScopedReadLock(ReadWriteMutex& rwLock) :
                m_rwLock(rwLock)
            {
                m_rwLock.acquireReadLock();
            }
    
            ~ScopedReadLock()
            {
                m_rwLock.releaseReadLock();
            }
    
        private:
            ReadWriteMutex& m_rwLock;
        };
    
        class ScopedWriteLock : boost::noncopyable
        {
        public:
            ScopedWriteLock(ReadWriteMutex& rwLock) :
                m_rwLock(rwLock)
            {
                m_rwLock.acquireWriteLock();
            }
    
            ~ScopedWriteLock()
            {
                m_rwLock.releaseWriteLock();
            }
    
        private:
            ReadWriteMutex& m_rwLock;
        };
    
        void acquireReadLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
    
            while(m_pendingWriters != 0 || m_currentWriter)
            {
                m_writerFinished.wait(lock);
            }
            ++m_readers;
        }
    
        void releaseReadLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
            --m_readers;
    
            if(m_readers == 0)
            {
                m_noReaders.notify_all();
            }
        }
    
        void acquireWriteLock()
        {
            boost::mutex::scoped_lock lock(m_mutex);
    
            ++m_pendingWriters;
            
            while(m_readers > 0)
            {
                m_noReaders.wait(lock);
            }
    
            while(m_currentWriter)
            {
                m_writerFinished.wait(lock);
            }
            --m_pendingWriters;
            m_currentWriter = true;
        }
    
        void releaseWriteLock()
        {        
            boost::mutex::scoped_lock lock(m_mutex);
            m_currentWriter = false;
            m_writerFinished.notify_all();
        }
    
    private:
        boost::mutex m_mutex;
    
        unsigned int m_readers;
        boost::condition m_noReaders;
    
        unsigned int m_pendingWriters;
        bool m_currentWriter;
        boost::condition m_writerFinished;
    };
    Still wont complie gives me the crap that i posted first....
    how about not compiling with vc2010, it sucks balls, if you only like the IDE just set the environment path to an older version. As a side note: I've never managed to use boost successfully, and looking back I'm glad I didn't because you learn much more if you do it all by yourself

    I'm SCHiM

    Morals derive from the instinct to survive. Moral behavior is survival behavior above the individual level.

    Polymorphic engine
    Interprocess callback class
    SIN
    Infinite-precision arithmetic
    Hooking dynamic linkage
    (sloppy)Kernel mode Disassembler!!!

    Semi debugger




  10. #10
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,858
    Reputation
    3438
    Thanks
    101,669
    My Mood
    Breezy
    Quote Originally Posted by whit View Post
    Im pretty sure why posted the post about the precompiled library ..
    either that or im stoned
    No your not stoned. Just a fail quote from the threadstarter.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.7.3
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  11. #11
    faceofdevil's Avatar
    Join Date
    Jul 2009
    Gender
    female
    Posts
    77
    Reputation
    9
    Thanks
    6
    Quote Originally Posted by master131 View Post
    No your not stoned. Just a fail quote from the threadstarter.
    How is it a failed Quote. He explained something i researched it and post his answer.

    little to much wacky tobacky master131.

    If i install vc2008 and complie the old boost libs and includes my source seems to work fine but if i upgrade it to vc2010 i get that werid complie error.'

    Would be nice if someone could explain why it gives this error when the libs and includes have been tested on the vc2010 complier.

    (nothing wrong with my source code)

    Read and write mutex is all it is.... (very hand than writing your own)

  12. #12
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    *facepalm*
    Ah we-a blaze the fyah, make it bun dem!

  13. The Following User Says Thank You to Hell_Demon For This Useful Post:

    [MPGH]master131 (01-20-2011)