locked
The application was unable to start correctly (0xc00007b) [CLR + x64 + Boost library] RRS feed

  • Question

  • Hello,
    I am getting this message "The application was unable to start correctly (0xc00007b)" while running this test code with VS2010 using x64 and CLR.  The DLL of boost library has been generated by MSVC10.0 from Boost v1.50.0. This code works fine with Win32 and CLR, also x64 and "No Common Language RunTime Support" in release/debug mode.

    I tried VS2013 and Boost v1.55.0 (generated by MSVC12.0), and got the same error, also with x64 and "No Common Language RunTime Support" in debug mode.

        #include <boost/thread/recursive_mutex.hpp> 
         class Mutex : public boost::recursive_timed_mutex
         {public:
               inline void UNLOCK(){unlock();}
          };

          int _tmain(){
               Mutex mutex1;
               mutex1.UNLOCK();
               return 0;}

    This simplified code has used to find the original error "basic_timed_mutex.hpp(214): fatal error C1001: An internal error has occurred in the compiler" for compiling boost library in x64 and CLR  [similar to: http://social.msdn.microsoft.com/Forums/vstudio/en-US/c44ff6a6-57f5-442b-9ef3-91727b06647c/vs2010-and-clr-fatal-error-c1001-an-internal-error-has-occurred-in-the-compiler?forum=vcgeneral  

    and 

    connect.microsoft.com/VisualStudio/feedback/details/629931 ].

    Thanks in advance for any help or suggestion.



    • Edited by MaySam-S Tuesday, November 19, 2013 10:09 PM
    Tuesday, November 19, 2013 8:35 PM

Answers

  • Hello,

    I'm apologize for delay.

    From this page, we see the cause of 0xc000007b is Boost::Thread is linked statically to binary built with /clr.

    Soulution:

    Link Boost::Thread dynamically through

    "#define BOOST_THREAD_DYN_LINK "

    If it doesn't work for you, please feel free to let me know.

    • Proposed as answer by Anna Cc Wednesday, December 4, 2013 12:16 PM
    • Marked as answer by Anna Cc Thursday, December 5, 2013 7:37 AM
    Wednesday, December 4, 2013 3:15 AM

All replies

  • Hi MaySam-S,

    "I am getting this message "The application was unable to start correctly (0xc00007b)" while running this test code with VS2010 using x64 and CLR."

    "This code works fine with Win32 and CLR, also x64 and "No Common Language RunTime Support" in release/debug mode."

    Could you please clarify your issue?

    From your error 0xc000007b I found that the error means "STATUS_INVALID_IMAGE_FORMAT".


    • Edited by Anna Cc Wednesday, November 20, 2013 9:57 AM
    Wednesday, November 20, 2013 9:55 AM
  • Hi,

    I need to run a project with x64 in CLR mode. It does not run because of "basic_timed_mutex.hpp(214): fatal error C1001: An internal error has occurred in the compiler". I have simplified the code but the new code (in the main question) still cannot run and gets stopped by "error 0xc000007b" at run-time. Why should I take "error 0xc000007b" just in one specific configuration (x64 + CLr)? As I mentioned the code works fine with (x32 + CLR), (x32 + "No Common Language RunTime Support") and (x64 + "No Common Language RunTime Support").

    Friday, November 22, 2013 7:42 PM
  • Hello,

    I'm apologize for delay.

    From this page, we see the cause of 0xc000007b is Boost::Thread is linked statically to binary built with /clr.

    Soulution:

    Link Boost::Thread dynamically through

    "#define BOOST_THREAD_DYN_LINK "

    If it doesn't work for you, please feel free to let me know.

    • Proposed as answer by Anna Cc Wednesday, December 4, 2013 12:16 PM
    • Marked as answer by Anna Cc Thursday, December 5, 2013 7:37 AM
    Wednesday, December 4, 2013 3:15 AM