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

Conflict with some macros #44

Open
Xrysnow opened this issue Dec 11, 2020 · 5 comments
Open

Conflict with some macros #44

Xrysnow opened this issue Dec 11, 2020 · 5 comments
Labels
compile compile problems

Comments

@Xrysnow
Copy link
Contributor

Xrysnow commented Dec 11, 2020

My environment has macro UNICODE and DEBUG defiened and they conflict with some names in the project. I think it's better to rename them to avoid this.

@NanoMichael
Copy link
Owner

Is there just DEBUG macro is conflict? If you can provide more macros that conflict I can rename them in one PR.

@Xrysnow
Copy link
Contributor Author

Xrysnow commented Dec 13, 2020

UNICODE is also defined on windows when using unicode charset.

Anyway, all-upper names without prefix or postfix are easy to meet conflict. I think you can change their name style

@PikachuHy
Copy link
Contributor

DEBUG is a macro in MSVC.
Please rename it.
To compile the code in MSVC, I hack it.
see a734d9c

@PikachuHy
Copy link
Contributor

UNICODE is also a macro in MSVC.

@NanoMichael NanoMichael added the compile compile problems label May 7, 2021
@hsandt
Copy link

hsandt commented Sep 13, 2021

Coming from https://github.com/Xrysnow/LuaSTG-x (@Xrysnow 's project which uses cLaTeXMath) and also encountered build issue because of DEBUG:

1>...LuaSTG-x_release_20210528\frameworks\external\cLaTeXMath\src\src\core\formula.cpp(194,14): error C2589: '=': illegal token on right side of '::'
1>...LuaSTG-x_release_20210528\frameworks\external\cLaTeXMath\src\src\core\formula.cpp(194,17): error C2082: redefinition of formal parameter 'b'

I renamed Box::DEBUG to Box::enableDebug in atom.h, box.cpp and formula.cpp to make it work.

(btw it would probably be easier to maintain if the Box was entirely defined in its own file rather than split across files, unless there's a reason for keeping the declaration in atom.h)

@Xrysnow how did you actually build your project? Did you find a workaround that doesn't require changing source files?

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

No branches or pull requests

4 participants