From: Nitro <ni...@dr...> - 2007-09-13 11:56:52
|
Am 13.09.2007, 13:20 Uhr, schrieb stupid <st...@gm...>: > Hi all, > im am not sure if there is a solution. > on my development machine, i have python 2.5 installed. > with swig, i have build a python module for my c++ dll, which works fine > on my dev. machine. > on another machine, python 2.2 is installed. if i want to use my wrapped > dll > here in > a python script, it fails and complains about wrong python version. > > well, i do not really wonder about, but ask me, if there is no > workaround or > "switch" in the swig settings > to get highest compatibility when building wrapper modules for c++ DLLs, > thus they work with all prior python versions. > > - or is this a general weakpoint of SWIG ? This has nothing to do with SWIG. SWIG's code is compatible with older versions of python. Due to changes between versions in python you have to recompile the wrapper code for each version of python you want to run it on. So if you want your code to run on python 2.2, 2.3, 2.4 and 2.5 you will have to compile the wrapper code 4 times and each time use a different include and linker path which will result in 4 different libraries. |