Skip to content

DLL in Windows #8

@freesoul

Description

@freesoul

Hello, I could not figure out how to load the generated .lib after nmake in Windows (10), so I compiled the DLL following these steps:

  1. add __declspec(dllexport) to the public functions
  2. Just run this cl /nologo /DWIN32 /DWIN64 /I libIP2Proxy /LD /Tp libIP2Proxy/IP2Proxy.c Ws2_32.lib

The generated DLL can be passed as argument as this

db = ip2proxy_python_c.IP2Proxy(libraryname=dllpath)

Additionally, it would be nice to specify that to run that .bat you need actually microsoft visual studio with the python extension. Also you should run the .bat to set the env to 64 or 32 bit as wished. Finally, to run nmake you have to do add a flag to specify which file: nmake /A /f Makefile.win

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions