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

CreateFile call not working with wstring on Windows #226

Open
mabraham opened this issue Jan 10, 2019 · 2 comments
Open

CreateFile call not working with wstring on Windows #226

mabraham opened this issue Jan 10, 2019 · 2 comments

Comments

@mabraham
Copy link

At

HANDLE handle = CreateFile(tmp.c_str(),
the CreateFile function is used with a wide string. The GROMACS project bundles a recent version of clFFT that has the same implementation. For one user of GROMACS, it did not work - see https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users/2019-January/123689.html.

I can see that CreateFileA https://docs.microsoft.com/en-us/windows/desktop/api/FileAPI/nf-fileapi-createfilea requires a non-wide char pointer, and the CreateFileW version is probably supposed to be used. I don't know how CreateFile works, but I assume that it must be something that ought to resolve to CreateFileA or CreateFileW according to the type of the first parameter, but it didn't work in this case.

Given that the non-Windows code uses a normal non-wide char, perhaps Windows should also do that?

@mabraham
Copy link
Author

I see at https://github.com/clMathLibraries/clFFT/wiki/Build#supported-compilers that only VS 2010 is supported, which may be related here.

I will disable GROMACS support for OpenCL on Windows accordingly.

@VincentSC
Copy link

VS2010? Indeed looks like AMD's open source OpenCL libraries need some work. :/

@mabraham mabraham changed the title CreateFile call not working with wstring on wstring CreateFile call not working with wstring on Windows Feb 5, 2019
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