R6034 error (Windows)

49 views
Skip to first unread message

Eric Earnst

unread,
Oct 13, 2012, 11:41:17 PM10/13/12
to gui...@googlegroups.com
Hi all,
I am trying to use GU2Exe to build an executable using py2exe 0.6.9 / py 2.7.3 / Win 7 64.  I wanted to include a program icon so I added the icon resource and I read somewhere that I should include a manifest file so everything looked ok.  However, once I check the box for the XP Manifest File, the generated EXE fails with an R6034 error ("An application has made an attempt to load the C runtime library incorrectly...").  If I un-check the box everything works (though the icon doesn't always display in the taskbar properly).  I lots of related questions when I search but no clear answers.  I'm using TkInter, BeautifulSoup, pypubsub, pyparsing and the requests library, everything else is working great.

I saw suggestions to add Microsoft.VC90.CRT files (manifest and three DLLs) so I added them to the Data Files list.  They showed up in the dist folder as their own subfolder but I am still getting the error.  I saw another suggestion ( http://py2exe.org/index.cgi/Tutorial#Step52 ) to add the following to setup.py:

sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT")

so I used the option to "Add custom code" to add it (along with import sys) with an adjustment for my path to the files; no change.

Is this the approach to resolving the R6034 error? 

I'm not sure if adding the VC90 files is required for this problem but I know it is for some problems, is this the right way to do it?

Thanks,
Eric

Eric Earnst

unread,
Oct 18, 2012, 2:50:28 AM10/18/12
to gui...@googlegroups.com

I ran across this:
http://stackoverflow.com/questions/9793742/py2exe-the-exe-is-created-but-if-you-run-it-you-get-a-runtime-error-r6034

I went looking for <dependentAssembly> in the GUI2Exe source and found it in Constants.py.

I changed:

<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="X86"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>

to:

<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.VC90.CRT"
            version="9.0.30729.4918"
            processorArchitecture="X86"
            publicKeyToken="1fc8b3b9a1e18e3b"
            language="*"
        />
    </dependentAssembly>
</dependency>

And now it compiles and runs.

The icons don't appear to be working properly (still have the default icon for the exe) but one more layer of the onion may have been peeled...

Eric
Reply all
Reply to author
Forward
0 new messages