#16599: Use of wxPython in an own process build with Visual Studio 2012 does not work

15 views
Skip to first unread message

wxTrac

unread,
Oct 7, 2014, 8:51:34 AM10/7/14
to wx-...@googlegroups.com
#16599: Use of wxPython in an own process build with Visual Studio 2012 does not
work
----------------------+--------------------
Reporter: EboEbo | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxPython | Version: 3.0.0
Keywords: | Blocked By:
Blocking: | Patch: 0
----------------------+--------------------
I created an application with Visual Studio 2012 with an embedded python
interpreter (using python 2.7). Then I try to import wx in my application,
an error occurs, because the _core_.pyd dll cannot be loaded. The reason
for that is, that the dependend dlls (crt 9.0) cannot be loaded. The
_core_.pyd dll should define this dependency in its manifest information.
In Pythonwin the import works fine, because the Pythonwin manifest
information contains the above dependency. As a workaround I could copy
these informations into the manifest information of my executable, but in
my opinion, this is not the right way. It would be better, if the
dependency would be added into the _core_.pyd.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/16599>

wxTrac

unread,
Oct 7, 2014, 3:07:40 PM10/7/14
to wx-...@googlegroups.com
#16599: Use of wxPython in an own process build with Visual Studio 2012 does not
work
-----------------------+--------------------
Reporter: EboEbo | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxPython | Version: 3.0.0
Resolution: wontfix | Keywords:
Blocked By: | Blocking:
Patch: 0 |
-----------------------+--------------------
Changes (by robind):

* status: new => closed
* resolution: => wontfix


Comment:

My understanding is that there will be other issues trying to use an
extension module built with VS2008 with your application and Python built
with VS2012, you really should not have different versions of the runtime
libraries in the same process unless they are totally isolated from each
other, which is not the case with Python. The best solution for you is to
also build your own wxPython (and any other extension modules that you
use) with VS2012.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/16599#comment:1>

wxTrac

unread,
Oct 8, 2014, 9:26:31 AM10/8/14
to wx-...@googlegroups.com
#16599: Use of wxPython in an own process build with Visual Studio 2012 does not
work
-----------------------+----------------------
Reporter: EboEbo | Owner:
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: wxPython | Version: 3.0.0
Resolution: | Keywords:
Blocked By: | Blocking:
Patch: 0 |
-----------------------+----------------------
Changes (by EboEbo):

* status: closed => reopened
* resolution: wontfix =>


Comment:

Replying to [comment:1 robind]:
> My understanding is that there will be other issues trying to use an
extension module built with VS2008 with your application and Python built
with VS2012, you really should not have different versions of the runtime
libraries in the same process unless they are totally isolated from each
other, which is not the case with Python. The best solution for you is to
also build your own wxPython (and any other extension modules that you
use) with VS2012.

I think, there was a misunderstandig. My own application is build with
Visual Studio 2012, but Python and wxPython were built with Visual Studio
8. The reason for that is, that I do not want to provide each python
library in a Visual Studio 2012 build by myself. I just want to reuse the
provided installations from the web.

The Microsoft approach to solve such problems is written here:
Visual C++ libraries cannot be used by a C/C++ application without a
manifest binding the application to these libraries. If a C/C++
application that depends on a Visual C++ library does not use a manifest,
then an attempt to load the Visual C++ library as a dependent DLL from the
application-local folder will result in an error message indicating that
this is an unsupported way of loading a Visual C++ library.
(taken from http://msdn.microsoft.com/en-
us/library/ms235624%28v=vs.80%29.aspx)

I think the best solution would be, that the dependency is added to the
wx.manifest when compiled with Visual Studio 8 like:
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.VC90.CRT"
version="9.0.21022.8" processorArchitecture="x86"
publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
</dependentAssembly>
</dependency>

Is it possible to give a statement to this suggestion?

Thanks in advance.

--
Ticket URL: <http://trac.wxwidgets.org/ticket/16599#comment:2>

wxTrac

unread,
May 7, 2017, 6:00:16 PM5/7/17
to wx-...@googlegroups.com
#16599: Use of wxPython in an own process build with Visual Studio 2012 does not
work
-----------------------+--------------------
Reporter: EboEbo | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: wxPython | Version: 3.0.0
Resolution: outdated | Keywords:
Blocked By: | Blocking:
Patch: 0 |
-----------------------+--------------------

Comment (by christiank):

Using a recent snapshot indeed solves the issue. Could you please comment
if you added the manifest to _core_.pyd as suggested by the OP?

--
Ticket URL: <http://trac.wxwidgets.org/ticket/16599#comment:4>
Reply all
Reply to author
Forward
0 new messages