I have problem when I am building project in Visual Studio 2010 for 64bit. I couldn't able to build for 64bit with boost library, I am getting below error. I can build for 32bit but not for 64bit.
\boost_1_49_0\boost\thread\win32\basic_timed_mutex.hpp(159): fatal error C1001: An internal error has occurred in the compiler
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\wvm\mdmiscw.c', line 2704)
5 To work around this problem, try simplifying or changing the program near the locations listed above.
5> Please choose the Technical Support command on the Visual C++
5> Help menu, or open the Technical Support help file for more information
5> The command exited with code 2.
It is pointing error to the below code and ofcourse I can't change the boost library. I am confused with this error
void unlock()
{
long const offset=lock_flag_value;
long const old_count=BOOST_INTERLOCKED_EXCHANGE_ADD(&active_count,lock_flag_value);
if(!(old_count&event_set_flag_value) && (old_count>offset))
{
if(!win32::interlocked_bit_test_and_set(&active_count,event_set_flag_bit))
{
win32::SetEvent(get_event());
}
}
}
Can you please help me,
Thank you
Edited :
I am not sure where the error but I think its in the boost libraries, there is a cpp file like
Class a::a(, point, )
{
}
and the "point" is a namespace which is defined in a header file which is using boost libraries and it has following code
#include <boost/thread.hpp>
#include <boost/thread/recursive_mutex.hpp>
namespace point
{
// some work1
void fun()
{
boost::unique_lock< boost::recursive_mutex > lck(*m_RedrawMutex);
// some work2
}
// some work3
}
Answer :
It finally worked !! After two days of search, I found another way.I just changed the order of include path in the project header where it was using boost basic_timed_mutex.hpp. I placed boost include path at the top and it worked. It's strange!!!