8000 `WIN32` definition for creating DLLs on Windows is somewhat misleading · Issue #63 · docopt/docopt.cpp · GitHub
[go: up one dir, main page]

Skip to content

8000 WIN32 definition for creating DLLs on Windows is somewhat misleading #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
blandcr opened this issue Oct 21, 2016 · 2 comments
Closed

Comments

@blandcr
Copy link
blandcr commented Oct 21, 2016

The PR that added WIN32 dllimport/dllexport stuff inadvertently seems to have broken static linking with docopt_s if you have WIN32 defined.

The problem seems to be with symbols being tagged with dllexport/dllimport due to the WIN32 flag being defined.

The problem is exhibited on my setup:
using CMake with -G"Visual Studio 14 2015 Win64" -TLLVM-vs2014 arguments (so clang 3.9.0 toolset and using msbuild/visual studio to build)

I am unsure if the same problem is exhibited when building with cl.

I think a good resolution is maybe changing the WIN32 flag to be named something a little more obvious like WIN32_DLL or something and providing some documentation regarding it in the CMakeLists.txt and Readme.rst file.

If you want I could write up a quick blurb and do some more testing to verify whether this happens when using cl or not and submit a PR Just let me know!

@jaredgrubb
Copy link
Member

I just made a merge of a patch that adjusted this a bit .. can you take a look and see if this addresses your issue or if there is still something to do?
#61

@blandcr
Copy link
Author
blandcr commented Oct 27, 2016

#61 solved the issue I was seeing. Thanks!

@blandcr blandcr closed this as completed Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0