No mingwm10.dll solution and mingwm10.dll function found

Source: Internet
Author: User
Tags qt designer

Today, I installed QT and ran a simple example of QT. Then I ran the * generated in the \ debug folder *..ProgramFailed to start. "Re-installing the application may fix this problem ." This problem may be caused by the environment variable being not set. You can modify the path through: My computer> Properties> advanced> environment variable, so that the path can be modified permanently. Now, after adding "C: \ QT \ 2009.04 \ mingw \ bin; C: \ QT \ 2009.04 \ QT \ bin" to the path, you can run it.

Let's take a look at the role of mingwm10.dll:

Mingw is short for minimalistic GNU for windows. It provides the header files and libraries necessary to construct Win32 programs based on GNU gcc and Other Related Programs (make, Autoconf, and so on. Maybe you will first think of cygwin. Both methods can compile and run Unix programs under Win32. However, cygwin maps the complete POSIX system call to a local API and uses a DLL that simulates POSIX calls. Therefore, the actual execution efficiency is inferior to that of local compilation.Code. Another point: cygwin's license is GPL, which means that your platform code on cygwin must be open. (This is very unacceptable, just because the source code is open for porting)

In contrast to cygwin, mingw compiles the code into Win32 local code and uses the C Runtime Library of msvcrt. dll. In addition, other runtime libraries of mingw are not protected by GPL license, which means that the Code Compiled using mingw does not need to be publicly sourced. Msvcrt. dll is released along with the Win32 platform, so it is a completely free environment.

Some people may ask: why does mingw need to be used for Visual C ++ and Borland C ++? First, they are not free; second, porting C/C ++ programs under UNIX will be very painful.

Currently, open-sourceCommunityIn UNIX, many famous libraries and programs have mingw versions (because of convenient transplantation ). At the same time, Win32 local APIs and other libraries, such as DirectX 7/8/9 and OpenGL, are all transplanted to mingw, which is an ideal cross-platform solution.

However, it is found that some mingw compiled programs still need mingwm10.dll.

Search: mingwm10.dll is a dynamic link library of mingw, but not a Runtime Library of C.

Even when using VC ++ you have to ship the C runtimes, unless you use VC ++ 6 which has the same C Runtime as shipped with windows already.

Volker

Not true, because "-mthreads" is just needed for thread-safe Exception Handling. Since QT does not use tions at all, you can safly remove this flag on a MinGW32-System.

This dll is required if the-mthreads link option is available. No static link is found yet.

If you wish to remove the dependency on mingwm10.dll as well, here are the steps I followed.
Note: There is some discussion around the forums as to whether this is a valid solution.
It seems to work for me so far.

Edit c: \ QT \ qt4.2.3 \ mkspecs \ win32-g ++ \ qmake. conf and remove all occurrences of "-mthreads ".
Recompile Qt as above. compile your project and the dependency on mingwm10.dll will be no longer.

I created a MT application with u ++, and run it withouth mingw10.dll successfully.
This is not supposed to be possible. multithreaded Applications shoshould be built with the "-mthreads" option given to the compiler, which will trigger Dynamic Linking to mingw10.dll. it is promissed that a future version of mingw will remove this severe inconvenience.
There are long discussions about this topic on the qt forum.

That-mthreads is needed, because it makes the compiler generate thread-safe versions of some codes.
It links with mingwm10.dll as the DLL framework provide the only supported ented way a certain cleanup code
Cocould be triggered after each thread terminates. (VC ++ uses an uninitialized ented way) So I can no longer hope that you somehow miraculosly removed the dependency on mingwm10.dll.

OK, for the benefit of anonymous, this is how you get rid of mingwm10.dll.

Edit the file $ qtdir \ mkspecs \ win32-g ++ \ qmake. conf and remove all instances of-mthreads.
Then recompile your app. The mingwm10.dll is no longer a dependancy

Disclaimer: no-one seems to be entirely sure what that DLL is there.
The best explanation I 've seen is that it has something to do with propagating conditions in multithreaded programs. however, QT doesn't use limits, so unless you use them yourself, it shouldn't be a problem. I haven't had any problems with the DLL removed, and stored others have
Reported smooth sailing as well. However, this cocould create problems if you use exceptions and
Threads in your program.

As far as I know mingw-compiled multithreaded applicaions shoshould always be dynamically linked to mingwm10.dll, so this file shoshould be available on computers running the application. it seems that u ++ somehow removes this nasty limitation. how is that possible?

Technorati: GNU, mingw
Del. icio. us: GNU, mingw
Ice ROCKET: GNU, mingw
Flickr: GNU, mingw
Zooomr: GNU, mingw
Buzznet: GNU, mingw
Riya: GNU, mingw
43 things: GNU, mingw

"The mingwm10.dll is not found, so this program cannot be started. "Re-installing the application may fix this problem ." (Windows XP) 1 "\ debug folder *. EXE file double-click to execute the prompt" No mingwm10.dll found, so this program failed to start. "Re-installing the application may fix this problem ." This problem may be caused by the environment variable being not set. You can modify the path through my computer> Properties> advanced> environment variable so that the path can be changed permanently. now, after adding "F: \ ProgramFiles \ QT \ 2009.01 \ mingw \ bin; F: \ ProgramFiles \ QT \ 2009.01 \ QT \ bin" to path, you can run the program. 2. After designing the ***. UI with QT designer, uic.exe is required to obtain the ***. h/***. cpp file. Copy uic.exe *. you can run the UIC *** in the same folder as the UI ***. UI-O ***. h, the system prompts "mingwm10.dll is not found, so this program cannot be started. "Re-installing the application may fix this problem ." Then I tried ***. copy the UI to the uic.exe folder (F: \ ProgramFiles \ QT \ 2009.01 \ QT \ bin), use command line cmd to switch to the directory, and then run UIC ***. UI-O ***. h. You can get the corresponding ***. h file. In addition, in QT designer, you can use the toolbar "form --> View code" to obtain ***. H code, copy it out and then OK. note that UIC *** is required for versions earlier than qt4 ***. UI-O ***. h/UIC ***. UI-O ***. CPP to get ***. h /***. in qt4, you need to get ***. h. in another article Article "Major differences between qt4 and qt3" are described in detail. since you want to update the control, you need to use the qdesigner tool to re-draw the interface. OK, re-painting is only manual work. After the interface is painted, use UIC to generate code files based on the interface. The UIC of qt3 can be automatically generated. H and. CPP file. If you are creating a dialog box named testdialog, the UIC generated by qt3 is testdialog. H and testdialog. CPP, all interface initialization work is executed in the CPP file, and then the logic code of the program will be added to this file. For a dialog box that has completed the logic function, if you want to modify the interface layout, you have to use UIC generation again. H and. CPP file, and then copy the Code related to the interface to the file you have modified. At this time, you must not directly generate the modified file using UIC, because that way, your code will be washed out. At this point, qt4 has improved, because the recommended method in qt4 is to use UIC to generate an hfile Based on the interface file. The previous testdialog is used as an example. The generated file is called ui_testdialog.h, A class named ui_testdialog is implemented, including the Loading Function of all controls on the interface, while the logic function of the program still uses testdialog. h, and testdialog. CPP, and in testdialog. h uses multiple inheritance methods to inherit the actual testdialog class from the ui_testdialog class. In the testdialog constructor, you only need to use the ui_testdialog: setupui () method, you can build the entire interface, and because it is inherited from ui_testdialog, you can also easily access all controls in the logic code. From this point, the qt4 method is a huge improvement, because ui_xxx.h no longer contains any code written by the user. If you want to change the interface layout, you only need to use qdesigner to modify the interface, and then use UIC to generate the ui_xxx.h file to directly replace the original file. Of course, there are other ways to use the QT ui_xxx.h file. You do not have to use the multi-Inheritance Method. Here I just introduced the most convenient method. In addition, if the interface you designed is complex, you need to design and write logical code for some interfaces independently in other widgets, therefore, the ui_xxx.h file of the dialog at the top layer still needs to be manually modified. However, this modification is very simple compared with qt3.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.