|
From: Patrick H. <pa...@13...> - 2007-08-28 03:24:09
|
I think that the problem is that the DLL manifest for gmtl.pyd is not being found by the runtime loader. The PyGMTL build does not embed the manifest in the DLL when using Visual C++ 8.0. This can be corrected. Build PyGMTL again using the attached SConstruct file as a replacement for the one in your GMTL source tree. (I assume that you are using GMTL 0.5.4.) You do not need to clean your build tree if you still have it. The change I made only modifies how gmtl.pyd is linked, so only the last step of the build needs to be performed. I don't know what the Unicode warning is about, but it seems like a Boost problem. I don't see any non-ANSI characters in boost/utility/enable_if.hpp after skimming it. It's too bad that the compiler does not say what line contains the problematic character(s). -Patrick Ming Jia wrote: > Thank you for your detailed information. > > I am sorry for sending you wrong information. As I checked my building > steps again, I find the scon command will use the > Using 'C:\Program > Files\boost\boost_1_34_1\lib\boost_python-vc80-mt-1_34_1.dll' > > Not the debug version of dll. And this dll can be found. > So my problem is probably not the debug/release problem. > > Also, is the unicode warning happened for other computers? it seems like > a boost problem. But I do not know how to configure it. > > Thanks. > On 8/22/07, *Patrick Hartling* <pa...@13... > <mailto:pa...@13...>> wrote: > > Ming Jia wrote: > > Sorry for opening a new thread of the same problem, I just subscribe > > this email list. > > > > I have set the path to boost-python in system path. > > That is set the C:\Program Files\boost\boost_1_34_0\lib to %PATH%, > > and when using scons to build the pygmtl, the scons can find the > correct > > boost_python-vc80-mt-gd-1_34.dll under this path. > > > > One thing that maybe helpful is that, when I use scons to build > pygmtl, > > I get the following warning for all the files. > > > > C:\Program Files\boost\boost_1_34_0\boost/utility/enable_if.hpp : > > warning C4819: > > The file contains a character that cannot be represented in the > current > > code pa > > ge (936). Save the file in Unicode format to prevent data loss > > > > > > Is that related to my problem when issue "import gmtl" in python: > > Traceback (most recent call last): > > File "<pyshell#0>", line 1, in <module> > > import gmtl > > ImportError: DLL load failed: A dynamic link library (DLL) > > initialization routine failed. > > > > Another thing is that, right before the ImportError happens, there > is a > > window pop up, and saying: > > > > Runtime Error! > > Program: C:\Program Files\Python25\pythonw.exe > > > > R6034 > > An application has made an attempt to load the C runtime library > > incorrectly. > > > > Thanks a lot for your help. > > It sounds as though you are mixing release and debug runtimes. > According to > your previous post, you built PyGMTL with optimization enabled, but > you are > now saying that it is linked against > boost_python-vc80-mt-gd-1_34.dll, which > is linked against the debug Visual C++ runtime. If you need to use > the debug > runtime, you need to have a version of python25.dll that is also linked > against the debug Visual C++ runtime (python25d.dll, IIRC). -- Patrick L. Hartling VP Engineering, Infiscape Corp. http://www.infiscape.com/ |