Custom Widget Plugin Example causes Runtime Error
Hi,
I am doing the Qt tutorial “Custom Widget Plugin Example†in
C:\Qt\4.2.2\doc\html\designer-customwidgetplugin.html.
I built the example C:\Qt\4.2.2\examples\designer\customwidgetplugin using the commands qmake, nmake, and nmake install. I then started Qt Designer and got the message below. The clock widget did not load in Designer. Any ideas as to why? My environment seems to be fine. I've done lots of examples and built my own apps.
Thank you.
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!
Program: C:\Qt\4.2.2\bin\designer.exe
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.
---------------------------
OK
---------------------------
Re: Custom Widget Plugin Example causes Runtime Error
You may be trying a debug plugin with a release Designer. Make sure you compile it in release mode.
Re: Custom Widget Plugin Example causes Runtime Error
Quote:
Originally Posted by
wysota
You may be trying a debug plugin with a release Designer. Make sure you compile it in release mode.
Thanks for the reply. You raise a good point, but everything is set for release. That was covered in the documentation. Another point is that this is a "factory set-up" example that was not modified, so it should be good as-is. That last part makes me think of compiler issues, but I'm using VS 2003, which, I'd have to believe, has been tested extensively by the Qt guys.
Re: Custom Widget Plugin Example causes Runtime Error
The message you get from the runtime is practically worthless :) If you own a commercial licence, ask the Trolls about it (it seems to be a compiler issue). Does the "R6034" mean anything?
Re: Custom Widget Plugin Example causes Runtime Error
Quote:
Originally Posted by
wysota
The message you get from the runtime is practically worthless :) If you own a commercial licence, ask the Trolls about it (it seems to be a compiler issue). Does the "R6034" mean anything?
Your question inspired me to do what I should have done in the first place - google it. MSDN states:
C Run-Time Error R6034: An application has made an attempt to load the C runtime library without using a manifest. This is an unsupported way to load Visual C++ DLLs. You need to modify your application to build with a manifest. For more information, see the "Visual C++ Libraries as Shared Side-by-Side Assemblies" topic in the product documentation.
If you use nmake on the command line, as I do, you have to jump through a whole lot of hoops. Take a look at http://msdn2.microsoft.com/en-us/library/ms235591.aspx if you are interested.
Thanks for your question!
Re: Custom Widget Plugin Example causes Runtime Error
Add CONFIG += embed_manifest_exe into the project file, rerun qmake and recompile the application.
BTW. You might have the environment set up incorrectly. I believe that with Visual Studio 2005 this option should be enabled by default.