[C++-sig] boost::python executes wrong implementation

AdrianB Adrian.Baetu at plato-ag.com
Tue Nov 2 17:51:27 CET 2010


The Situation:
There are three modules involved:
a) myapi.pyd
b) myapi.dll
c) myserver.dll

myapi is a VC++ Project which exposes few classes and methods to python.
  myapi.pyd is a UNICODE build, to be used in python.
  myapi.dll is a ANSI build, to be used embedded by the myserver.dll

myserver.dll runs python embedded, and links myapi.dll

UseCase in Python:
# ------------------
import myapi                                      # myapi.pyd
session = myapi.Session( <some credentials> )     # myapi.pyd::Session
# at this moment myserver.dll gets loaded into the python process
# along with its embedded python module, called "myembedded"

import myembedded                                 # myserver.dll
embedded_session = myembedded.Session()           # myapi.dll::Session

#!! The ISSUE !!
# should call myapi.dll::Session::myEmbeddedImpl()

# -- what happens? --
instead of executing 
it executes

Why? And how can I avoid this?

Anny idea and help is greatly appreciated,
best regards,

More information about the Cplusplus-sig mailing list