[python-win32] LNK4197 error building c++ extension
Tim Roberts
timr at probo.com
Tue Aug 21 21:12:25 EDT 2018
On Aug 21, 2018, at 5:59 AM, Robin Becker <robin at reportlab.com> wrote:
>
> C:\code\hg-repos\taggstate\REPOS\aggstate>ls build\temp.win-amd64-2.7\Release
> _aggstate.exp _aggstate.obj agg25
> _aggstate.lib _aggstate.pyd.manifest
>
> digging a bit deeper I find taht the problem comes from the exp file and the linker /EXPORT. It seems that the /EXPORT:init_aggstate can be suppressed for this build and the warning disappears, but something (I assume the exp) supplies the export. Certainly the pyd appears to work.
Yes, the /EXPORT linker command is just an alias for the .def file. You need to mention the entry point EITHER (1) in a .def file, (2) in a /EXPORT, or (3) with a __declspec(dll export). One and one only.
—
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list