Closed c0yote closed 9 years ago
@c0yote Thanks for the report. It appears from the error message that the MinGW error is a result of a C vs. C++ symbol mangling issue. I can't reproduce the issue using standard glibc on Linux since it's a C library. I am able to synthetically reproduce the problem by declaring a pseudo-printf
function inline though. That said, I can't remember what obscure compiler issue I ran into when originally inlined the printf
declaration (been around since the initial import). I'll poke around with some of the more obscure compilers in the list and see if I can reproduce what issue I was originally guarding against. If nothing breaks I'll just replace the inline declaration with a #include <cstdio>
.
Thanks, for having a look.
I can't build with both
tpunit++
andcstdio
. This is happening with MinGW 4.9.2Simply adding
#include <cstdio>
to the top oftpunit++main.cpp
breaks it with the following:Removing line 29:
extern "C" int printf(const char*, ...);
works with the
cstdio
include, but I don't want to hand edit the header every time I update. I don't know if this happens on other compilers\platforms, but I would find it hard to imagine it doesn't.I don't have a good solution for this. Maybe check for
cstdio
already turned on?e.g.
The block above did compile.
Or maybe a preprocessor flag to allow us to turn off the extern, and enabling standard
cstdio
through the include?e.g.