- UID
- 2
- 积分
- 8682
- 帖子
- 2905
- 主题
- 199
- 论坛币
- 11739
- 威望
- 16
- EP值
- 2349
- MP值
- 15
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 2597 小时
- 最后登录
- 2024-8-28
|
Issues
third party packages (i.e., site-packages) cannot be used in TCAX probably due to the modification of PATH environment variable.
Solution: this one is very easy to solve, just use sys.path.append() or sys.path.extend() to include the Python's site-packages directory. But when solving this issue, another one rose, that is, PyOpenGL requires msvcr90.dll to run, while tcax uses msvcr100.dll, the conflict needs to be eliminated. (Named R6034)
Solution of C Run-Time Error R6034
Posted by Microsoft on 8/26/2008 at 1:35 PM
The Visual C++ team has triaged the issue you reported. The issue has been resolved during triage with the following message:
When you compile you program in debug, the application manifest embedded in main.exe is this one:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>
</assembly>
As you can see, you depends on both Microsoft.VC90.DebugCRT and on Microsoft.VC80.CRT. The double dependency is not bad "per se". It's probably caused by a static library depending on the 80 Retail CRT.
Indeed, if you do "dumpbin /directives ssleay32.lib" you will find that they depend on the 80 Retail CRT.
But the problem is that you also have a dependency on the 90 Retail CRT (as you noticed with depends.exe), which is not expressed in the manifest.
Who's causing this dependency? Very likely, one of the static libraries you're using.
If you turn on the /verbose switch during the linking phase, you'll see in the output window that:
1> Referenced in OLDNAMES.lib(fileno.obi)
1> Loaded msvcrt.lib(MSVCR90.dll)
oldnames.lib brings in the dependency on msvcr90.dll.
There are two way of fixing this:
1) remove the need for oldnames.lib: oldnames.lib is brought in by fileno, which is referenced in libeay32.lib(bss_file.obj):
1> Searching c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib:
1> Found __imp__fileno
1> Referenced in libeay32.lib(bss_file.obj)
1> Loaded OLDNAMES.lib(fileno.obi)
2) manually add a depedency on msvcr90.dll assembly with an additional application manifest, which you have to write (you can't use Microsoft.VC90.DebugCRT.manifest, because it's an assembly manifest, not an application manifest)
3) manually add a depedency on msvcr90.dll assembly with a linker directive like this one (added to main.cpp, for example):
// add a dependency on the retail crt even in debug
#ifdef _M_IX86
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='x86' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_IX86 */
#ifdef _M_AMD64
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='amd64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_AMD64 */
#ifdef _M_IA64
#ifdef _DEBUG
#pragma comment(linker,"/manifestdependency:\"type='win32' " \
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \
"version='" _CRT_ASSEMBLY_VERSION "' " \
"processorArchitecture='ia64' " \
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
#endif
#endif /* _M_IA64 */
the code was adapted from crtdefs.h.
HTH. More help on this can be found on the forum or with product support.
For the next release of Visual Studio, we're planning to greatly simplify this complex scenarios.
For further information, you may want to consult one of these resources:
1. Visual C++ triage guidelines:
http://blogs.msdn.com/vcblog/articles/621116.aspx
2. MSDN forums:
http://forums.microsoft.com/msdn/default.aspx
Thank you for taking time to send us feedback,
The Visual C++ Team
So, the solution would be, add- #pragma comment(linker, "/manifestdependency:\"type='win32' " \
- "name='Microsoft.VC90.CRT' " \
- "version='9.0.21022.8' " \
- "processorArchitecture='x86' " \
- "publicKeyToken='1fc8b3b9a1e18e3b'\"")
复制代码 to tcax_cmd.c
Related Links
http://msdn.microsoft.com/en-us/library/ms235560(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/ms235560(v=vs.90).aspx
https://connect.microsoft.com/Vi ... t-vc90-crt-manifest
http://msdn.microsoft.com/en-us/library/ms235624(v=vs.90).aspx
http://productforums.google.com/forum/#!topic/chrome/nmmb8Y4m9NQ
http://msdn.microsoft.com/en-us/library/ew0y5khy(v=vs.100).aspx
|
|