skvadrik / re2c

Lexer generator for C, C++, Go and Rust.
https://re2c.org
Other
1.07k stars 169 forks source link

Rename src/debug/debug.h to not conflict with GNU ISO C++ Library #398

Closed memcache0 closed 2 years ago

memcache0 commented 2 years ago

I'm using MinGW on Windows with Code::Blocks as the IDE. When I compile the RE2C project, it will go wrong with src/compile.cc and main.cc. The reason is, RE2C has a header named src/debug/debug.h, while GNU ISO C++ Library has a standard header named debug/debug.h. When compile other files, it is OK. But for src/compile.cc and main.cc, the compiler needs to read debug/debug.h for system headers, unfortunately there is one along with src/compile.cc and main.cc in dir src/debug, so the system debug/debug.h cannot be read properly. My simple modification is to move src/compile.cc and main.cc to a sub dir src/main. But I think it is better to rename src/debug/debug.h to something like src/debug/re2c_debug.h, so that it won't conflict with system headers by chance.

trofi commented 2 years ago

I'd say such a failure exposes some misconfiguration in the build environment. Can you attach example config.log and build log that demonstrates the failure?

Note that re2c does not include "debug/debug.h" directly anywhere. It always uses #include "src/debug/debug.h".

skvadrik commented 2 years ago

Also please specify the steps how you build re2c.

trofi commented 2 years ago

@memcache0 can you provide above details?

trofi commented 2 years ago

Closing as NEEDINFO.