Skip to content
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

Windows: Add mising system DLLs import libraries. #1847

Closed
wants to merge 1 commit into from
Closed

Windows: Add mising system DLLs import libraries. #1847

wants to merge 1 commit into from

Conversation

Biswa96
Copy link

@Biswa96 Biswa96 commented Oct 11, 2020

No description provided.

@Biswa96 Biswa96 changed the title Windows: Add system libraries to link statically. Windows: Add mising system DLLs import libraries. Oct 11, 2020
@giampaolo
Copy link
Owner

It looks like this breaks python 2.7
https://ci.appveyor.com/project/giampaolo/psutil/builds/35688603/job/q3d29ymct4bwyeou
What problem does this solve? Can you provide an error/traceback?

@Biswa96
Copy link
Author

Biswa96 commented Oct 11, 2020

This helps to build without using GetProcAddress function (here psutil_loadlibs). The build error in Appveyor seems suspicious. The error is LINK : fatal error LNK1181: cannot open input file 'ntdll.lib'. It is related to Visual Studio. But ntdll.lib is present in any version of Windows SDK.

@giampaolo
Copy link
Owner

What's the problem with GetProcAddress / psutil_loadlibs?

@Biswa96
Copy link
Author

Biswa96 commented Oct 11, 2020

While compiling with GCC in Windows, there are may errors about multiple definition at linking time. Probably because many APIs are redefined in ntexapi.h file.

@giampaolo
Copy link
Owner

GCC on Windows? Are you trying to compile for cygwin? Because in that case it's not supported.

@Biswa96
Copy link
Author

Biswa96 commented Oct 11, 2020

It's MSYS2/mingw.

@giampaolo
Copy link
Owner

Also not supported (explicitly, I dropped mingw support years ago because supporting both compilers was a pain + the VS suite for compiling became free). You should use Visual Studio. setup.py could be be made a bit smarter to detect that and recommend VS though.

@Biswa96 Biswa96 closed this Oct 11, 2020
@Biswa96 Biswa96 deleted the add-windows-libraries branch October 11, 2020 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants