Wrapper function

Java and Swing codecraig at gmail.com
Tue Oct 11 20:30:12 CEST 2005


So, I write the C code...as shown previously.

Then, I do something like...

c:\> python
>> from distutils.core import setup, Extension
>>
>>setup(
>>    name="DLLTester",
>>    ext_modules = [Extension("DLLTester", ["test.c"])]
>>    )

c:\> python setup.py build_ext -i

..is that it?  If so, then it's ok that I get those 2 errors when
trying to build in visual c++?

thanks

Robert Kern wrote:
> Java and Swing wrote:
>
> > When I compile, I get two warnings..which are ok.  Then when I build my
> > DLL I get..
> >
> > Linking...
> >    Creating library Release/MyDLL.lib and object Release/MyDLL.exp
> > test.obj : error LNK2001: unresolved external symbol _PyBuildValue
> > Release/MyDLL.dll : fatal error LNK1120: 1 unresolved externals
> > Error executing link.exe.
> >
> > MyDLL.dll - 2 error(s), 0 warning(s)
> >
> > ..Any ideas?
>
> Are you using distutils to build your extension module? You should be.
>
> --
> Robert Kern
> rkern at ucsd.edu
>
> "In the fields of hell where the grass grows high
>  Are the graves of dreams allowed to die."
>   -- Richard Harter




More information about the Python-list mailing list