[test] Windows Vista: "The application failed to initialize properly (0xc0000005)."
I am using MinGW on Windows to try to compile a working shared binary of Unit Test Framework. My GCC version is the latest for MinGW, 4.5.0, and I used the following line to compile libboost_unit_test_framework-mgw45-mt-1_44.dll: bjam toolset=gcc link=shared --with-test release I have tried both Boost 1.43.0 and 1.44.0 beta 1 sources, but with each, bjam succeeds and my test program that uses UTF fails with the message dialog: The application failed to initialize properly (0xc0000005). Click OK to terminate the application. My test program compiles and runs fine on Debian Linux using Boost 1.42. Is anyone else experiencing this problem?
I am using MinGW on Windows to try to compile a working shared binary of Unit Test Framework. My GCC version is the latest for MinGW, 4.5.0, and I used the following line to compile libboost_unit_test_framework-mgw45-mt-1_44.dll: bjam toolset=gcc link=shared --with-test release
I have tried both Boost 1.43.0 and 1.44.0 beta 1 sources, but with each, bjam succeeds and my test program that uses UTF fails with the message dialog: The application failed to initialize properly (0xc0000005). Click OK to terminate the application.
My test program compiles and runs fine on Debian Linux using Boost 1.42.
Is anyone else experiencing this problem?
Yes!! But not with Boost.Test, I simply haven't been able to get any non-trivial program to run correctly when built with MinGW gcc-4.5.0. For example in libs/config/test the config_info program (pretty trivial) runs OK, but config_test (less trivial) crashes and burns with the initialization error. I haven't had a chance to work out what the cause is, and frankly I had thought it was a problem with my MinGW installation as no one else seems to have the issue... Love to know what the answer is yours, John.
John Maddock
But not with Boost.Test, I simply haven't been able to get any non-trivial program to run correctly when built with MinGW gcc-4.5.0]
Is this with the official mingw build? I've been running the regression tests with the Mingw builds from http://tdm-gcc.tdragon.net/ , which seems to be a bit more reliable.
Yes!!
But not with Boost.Test, I simply haven't been able to get any non-trivial program to run correctly when built with MinGW gcc-4.5.0. For example in libs/config/test the config_info program (pretty trivial) runs OK, but config_test (less trivial) crashes and burns with the initialization error. I haven't had a chance to work out what the cause is, and frankly I had thought it was a problem with my MinGW installation as no one else seems to have the issue...
Love to know what the answer is yours, John.
Well, I have one program that just uses STL and the header-only Boost Graph Library. I compiled it with MinGW GCC 4.5.0 and it runs fine. For me, the problem seems to be anything in UTF. For example, the attached minimal test case gives me the "The application failed to initialize properly (0xc0000005)" error. I compiled it with: g++ min_test.cpp -lboost_unit_test_framework-mgw45-mt-1_44.dll I think that I will try MinGW GCC 4.4.0... Daniel
Love to know what the answer is yours, John.
Well, I have one program that just uses STL and the header-only Boost Graph Library. I compiled it with MinGW GCC 4.5.0 and it runs fine. For me, the problem seems to be anything in UTF. For example, the attached minimal test case gives me the "The application failed to initialize properly (0xc0000005)" error. I compiled it with: g++ min_test.cpp -lboost_unit_test_framework-mgw45-mt-1_44.dll
I think that I will try MinGW GCC 4.4.0...
Good news! MinGW GCC 4.4.0 gets rid of this problem.
Good news! MinGW GCC 4.4.0 gets rid of this problem.
One difference between the binary that was compiled with MinGW GCC 4.5.0 and the binary compiled with 4.4.0 is that the former linked in libstdc++-6.dll. Maybe the "The application failed to initialize properly (0xc0000005)." error has something to do with the shared STL implementation being initialized twice or not being initialized before the UTF DLL.
Hi, I was having this same problem with the taglib library (another c++ shared library). I am 99% sure it is due to not linking using -enable-auto-import. I managed to use cmake to build taglib with -enable-auto-import during linking when building the library, and I add it when I link to taglib for my programs. It works fine now whereas without that option I was getting the exact same error message (failed to initialise properly, 0xc0000005) I think you need that option whenever you use gcc4.5.0 with c++ and shared libraries. I've been struggling to find a way to get bjam to add -enable-auto-import to all it's link stages when building boost with mingw. Can anyone help with this ? Cheers, Emyr On 07/08/10 16:46, Daniel Trebbien wrote:
Love to know what the answer is yours, John.
Well, I have one program that just uses STL and the header-only Boost Graph Library. I compiled it with MinGW GCC 4.5.0 and it runs fine. For me, the problem seems to be anything in UTF. For example, the attached minimal test case gives me the "The application failed to initialize properly (0xc0000005)" error. I compiled it with: g++ min_test.cpp -lboost_unit_test_framework-mgw45-mt-1_44.dll
I think that I will try MinGW GCC 4.4.0...
Good news! MinGW GCC 4.4.0 gets rid of this problem. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hello,
On Wed, Sep 8, 2010 at 8:21 PM, emyr
I've been struggling to find a way to get bjam to add -enable-auto-import to all it's link stages when building boost with mingw.
Can anyone help with this ?
Building boost with bjam: 1. Create a user-config.jam 2. Add the following line (refer http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html for details): using msvc : : : <linkflags>-enable-auto-import ; 3. Provide your config file (with valid path if you keep it in a different folder) to bjam as following: bjam --user-config=user-config.jam The key is "linkflags" in your user-config.jam file and its correct location. All those colons (:) are required and note the space before the last semi-colon. Building boost with CMake (not tried it though but have used CMake): You need to add the linker option to "CMAKE_EXE_LINKER_FLAGS". Maybe edit the toplevel CMakelists.txt or equivalent that acts as a driver to cmake. -dhruva
I've been struggling to find a way to get bjam to add -enable-auto-import to all it's link stages when building boost with mingw.
Can anyone help with this ?
Building boost with bjam: 1. Create a user-config.jam 2. Add the following line (refer http://www.boost.org/boost-build2/doc/html/bbv2/overview/configuration.html for details): using msvc : : : <linkflags>-enable-auto-import ; 3. Provide your config file (with valid path if you keep it in a different folder) to bjam as following: bjam --user-config=user-config.jam
The key is "linkflags" in your user-config.jam file and its correct location. All those colons (:) are required and note the space before the last semi-colon.
Excellent, thanks, that finally gets mingw4.5 working for me! Cheers, John.
participants (5)
-
Daniel Trebbien
-
dhruva
-
emyr
-
John Maddock
-
Richard Webb