One more thing to try: check if byte alignments in boost, your app and .net framework are same. Try to play with Project's settings in C/C++ -> Code Generation panel. I assume boost uses default alignment. Ovanes. On Fri, October 20, 2006 11:33, Andre Krause wrote:
just a beginners question, not want to start any flames: why are you using C++/CLI mode, if you are using portable libraries like boost anyway? why not build a native C++ application? what are pro's and con's? i must admit that i never got my head up into .net stuff, because i thought: "no way, i completely will loose cross platform." but now with mono, thats not true that much anymore. i heard that bytecode might be even faster than native code, because these bytecode JIT compilers can "magically" optimise speed at runtime!! ( see http://psyco.sourceforge.net/, http://www.kano.net/javabench/ , http://www.idiom.com/~zilla/Computer/javaCbenchmark.html )
John Dunn wrote:
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
#include 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 mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
With Kind Regards, Ovanes Markarian