Boost logo

Boost Users :

From: John Dunn (John_Dunn_at_[hidden])
Date: 2006-10-19 12:46:07


I'm curious if boost currently ( or plans to ) support C++/CLI. For the past
couple of months I've been using boost in a managed C++ application without
any issues ( but with quite a few scary warnings ). I've recently installed
the beta VS2005 SP and now my applicaiton crashes with the following error
if I link with the boost::thread library.
 
    The application failed to initialize properly (0xc000007b). Click on OK
to terminate the application.
 
Is this something that should work? I seem to remeber when I initially
downloaded boost some mention of it not supporting C++/CLI but I couldn't
find that reference again. Since it worked pre service pack should I
complain to MS? Is my best bet putting all my boost code inside of a DLL?
 
Here's a simple program which will crash if compiled with /clr. Note that no
managed C++ objects are used/created and I haven't instantiated a thread
object either.

#include <iostream>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>

static void thread_func() {
  int count = 5;
  while( count ) {
    std::cout << "thread func..." << std::endl;
    boost::xtime xt;
    boost::xtime_get( &xt, boost::TIME_UTC );
    xt.sec += 1;
    boost::thread::sleep( xt );
    count--;
  }
}

int main( int argc, const char* * argv ) {
  std::cout << "running" << std::endl;
  return 1;
}

Any pointers would be appreciated.

Thanks-

John Dunn
QSC Audio Products, Inc.


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