Interfacing the .pyd with other .dll
Hello, I am trying to build an application where my Python/C interface dynamic library (built using boost) is to call on function in another (windows) dll file containing the C function. I am using the 'bjam' tool to build the my Python/C interface (.pyd) file built it is giving me error. The C source file (which calls the function in another dll and used by boost to build the python/C interface ".pyd" files) gets compiled to generate the object file but linker fails to built the respective ".lib" and ".pyd" files as it doesn't get to link to the dll file defining a C function. I am fairly new to using bjam tool and my jamfile is a simple one. It looks like this: # Specify our location in the boost project hierarchy subproject libs/python/example/tutorial/nitin ; # Include definitions needed for Python modules import python ; extension world # Declare a Python extension called hello : main.cpp # source <dll>../../../build/boost_python # dependencies ; I do not know how can I specify bjam to compile and link with other dll for build the ".pyd" and ".lib" file. Can anyone help me how can I specify this in my jam file? It will be usefully for me if some one can tell where I can get documentation on writing jam files. I am using WinPython 2.3.2. I have built boost on Windows 2000 using MinGW compilers. Thanks in advance, Nitin
"Shukla, Nitin (Export)"
I am fairly new to using bjam tool and my jamfile is a simple one. It looks like this:
# Specify our location in the boost project hierarchy subproject libs/python/example/tutorial/nitin ;
# Include definitions needed for Python modules import python ;
extension world # Declare a Python extension called hello : main.cpp # source <dll>../../../build/boost_python # dependencies ;
I do not know how can I specify bjam to compile and link with other dll for build the ".pyd" and ".lib" file. Can anyone help me how can I specify this in my jam file?
If I understand you correctly, I think what you need to do is extension world # Declare a Python extension called world : main.cpp # source <dll>../../../build/boost_python # dependencies : # requirements <library-path>path/to/a/directory/containing/your/dlls/import/.lib <find-library>name/of/your/dll ; -OR- extension world # Declare a Python extension called world : main.cpp # source <dll>../../../build/boost_python # dependencies : # requirements <link-library>full/path/to/your/dlls/import/.lib ;
It will be usefully for me if some one can tell where I can get documentation on writing jam files.
You can get help with Boost.Build on the jamboost list: http://www.boost.org/more/mailing_lists.htm#jamboost
I am using WinPython 2.3.2. I have built boost on Windows 2000 using MinGW compilers.
HTH, -- Dave Abrahams Boost Consulting www.boost-consulting.com
participants (2)
-
David Abrahams
-
Shukla, Nitin (Export)