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

Compile fails in MSVC with /clr #17

Open
MrSapps opened this issue Feb 8, 2018 · 4 comments
Open

Compile fails in MSVC with /clr #17

MrSapps opened this issue Feb 8, 2018 · 4 comments

Comments

@MrSapps
Copy link

MrSapps commented Feb 8, 2018

Seems you can't have a namespace called "cli" when building with /clr.

error C3292: the cli namespace cannot be reopened

@FlorianRappl
Copy link
Owner

Yeah the Microsoft compiler (esp. with the CLR target) was never the main objective / target for this library, but supporting the build would be desirable. I just fear it would be a breaking change. Maybe have a macro depending on the compiler / flags to switch the namespace (i.e., use "cli" for non-CLR target and "ncli" or similar for CLR)?

Not sure if there is a compiler directive check we can apply here (which one). Would be happy if somebody could come up with a solution / PR. Any help appreciated!

@MrSapps
Copy link
Author

MrSapps commented Feb 14, 2018

Yeah I'm just sure.. I just hacked my local copy by renaming the namespace..

@zoulunkai
Copy link

zoulunkai commented May 25, 2024

Despite successfully building the project without /clr, I encountered debugging issues. Specifically, the MSVC2022 debugger couldn't inspect variables within the Parser class in debug mode. Renaming the "cli" namespace resolved this issue.

@FlorianRappl
Copy link
Owner

Again as per my comment if there is a directive that only applies in case of MSVC we could circumvent this. Otherwise this is more a bug in MSVC as it's not behaving standards compliant.

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

3 participants