From: William S F. <ws...@fu...> - 2011-01-07 07:49:28
|
On 20/12/10 17:02, Leonardo Zúñiga Salcedo wrote: > Hi, I'm trying to wrap up a propietary library (I just have the header > and a dll) in Python using swig, It appears to be o.k. with all of it, > except for some parts where the header has this: > > #ifdef DEFINE_PSEUDOGROUP_TYPE_NAMELIST > > char *pseudogroup_type_namelist[] = { > > "NONE", > > "SUBSET", > > "XRS", > > "PNOTE", > > "PNOTEMAIN", > > "PNOTETRUST", > > NULL }; > > #else > > extern char *pseudogroup_type_namelist[] ; > > #endif > > It gives me this warning, and initially I thought It wouldn't matter: > > C:\LIBDIR\lib.h(1779) : Warning 462: Unable to set dimensionless array > variable > This just means SWIG won't generate a wrapper to modify pseudogroup_type_namelist and is unrelated to your linker problem. > Later, the linker complains: > > lib_wrap.obj : error LNK2001: unresolved external symbol > _pseudogroup_type_namelist > Probably this is due to the SWIG generated wrapper to read/get pseudogroup_type_namelist. If you compile your code with DEFINE_PSEUDOGROUP_TYPE_NAMELIST defined, the symbol will no longer be extern and the symbol will be defined, hence the linker will find the symbol. > There are other errors as well, in three functions that appear to be not > defined (although they are): > > _mpi_message_get > > _mpi_message_set > > _errdie > > _worker not defined > You need to look in your code and see what is calling these methods and find out where they are defined and link to the dll that defines them. > I've googled a lot, and the most clarifying info I could get out there > was about writting typemaps, so I decided to contact you people to see > if there's a more straightforward mechanism to do this. > These linker problems don't look typemap related to me. William |