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

v0.12.0 is not working on Windows 7 #643

Closed
jfcherng opened this issue Sep 1, 2019 · 6 comments
Closed

v0.12.0 is not working on Windows 7 #643

jfcherng opened this issue Sep 1, 2019 · 6 comments
Labels
bug Something isn't working windows Issue is related to the Windows build of bat

Comments

@jfcherng
Copy link

jfcherng commented Sep 1, 2019

It just prompts an error box:

The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.dll

v0.11.0 works well btw.

image


The following is what I can find.

Actually the CreateFile2 function is started to be used from Windows 8. So you can't find an entry point of this method in Win7 Kernal32.dll. Have you tried to use CreateFile which could be used in Win7 instead of it?

From https://social.msdn.microsoft.com/Forums/officeocs/en-US/47470316-5868-4e6e-a62f-6b880c46d824/creating-exe-vcxproj-in-win-7-the-procedure-entry-point-ltfunctiongt-could-not-be-located-in?forum=vcgeneral#76d55530-70a6-41ab-9687-5f4129e0c79c

@sharkdp sharkdp added bug Something isn't working windows Issue is related to the Windows build of bat labels Sep 1, 2019
@sharkdp
Copy link
Owner

sharkdp commented Sep 1, 2019

Thank you for reporting this.

This could be related to an update in ansi_term which introduced these lines:
https://github.com/ogham/rust-ansi-term/blob/6755eaa7a1977caabf3013db3a3e08e11acface9/src/windows.rs#L28-L34

Ideally, this should be reported upstream in the ansi_term repo.

As a short-term measure, I think we could downgrade to an older version of ansi_term.

@jfcherng
Copy link
Author

jfcherng commented Sep 1, 2019

They seem to have this issue already resolved in ogham/rust-ansi-term#54.

@jfcherng jfcherng closed this as completed Sep 1, 2019
@sharkdp
Copy link
Owner

sharkdp commented Sep 1, 2019

Thank you for the link.

Well, the PR is not yet merged and there is no new version we could depend on. Let's re-open this ticket until we have a fix in bat (either by downgrading or by upgrading to a future version).

@sharkdp sharkdp reopened this Sep 1, 2019
@rivy
Copy link
Contributor

rivy commented Sep 3, 2019

The PR (#52) that should fix the issue has been merged into master for ansi-term.

Upgrading to ansi-term v0.12.1 should repair the issue for bat. Let me know if there's still a problem and I'll look at it again.

@sharkdp
Copy link
Owner

sharkdp commented Sep 3, 2019

@rivy Thank you!

New release is out: bat v0.12.1

@jfcherng: it would be great if you could confirm that this fixes the issue

@sharkdp sharkdp closed this as completed Sep 3, 2019
@jfcherng
Copy link
Author

jfcherng commented Sep 3, 2019

@sharkdp Yes, v0.12.1 works. Thanks you guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Issue is related to the Windows build of bat
Projects
None yet
Development

No branches or pull requests

3 participants