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

Stdcall methods on msvc return differently from functions #152

Open
Laeeth opened this issue Jan 9, 2019 · 4 comments
Open

Stdcall methods on msvc return differently from functions #152

Laeeth opened this issue Jan 9, 2019 · 4 comments

Comments

@Laeeth
Copy link

Laeeth commented Jan 9, 2019

So we should just include a test to keep compiler honest.

https://gist.githubusercontent.com/retep998/9503145841a61551d3c6/raw/a78ed471356f44430e7f9522f45878f9b4e55a19/com.cpp

rust-lang/rfcs#1342

@atilaneves
Copy link
Owner

I'm not even sure it makes sense for dpp to ever support MSVC - it uses libclang, the manglings won't work, and compilers have leeway to implement things differently, especially with the lack of a standard ABI for C++.

dpp should definitely work on Windows at some point.

@Laeeth
Copy link
Author

Laeeth commented Jan 10, 2019

Didn't follow the meaning of support msvc. Use case here for time being is quite substantial on windows and there we use msvc for now though I am trying to explore moving to clang.

Clang supports msvc abi and mangling though it's not perfect, especially for new features. I presume that means libclang is the same.

https://clang.llvm.org/docs/MSVCCompatibility.html

Libclang D bindings I think do work on windows with some effort. And even if they didn't I suspect you could tell libclang to target windows msvc though probably dpp would be confused by cross compilation.

@Laeeth
Copy link
Author

Laeeth commented Jan 10, 2019

For D community, yeah you can just #include cpp and it works. That's amazing - let's move our game dev to D. Uh it's Linux only ..

@Laeeth
Copy link
Author

Laeeth commented Jan 10, 2019

I think the manglings mostly will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants