On Sat, Feb 12, 2022 at 6:11 AM Jan Niklas Hasse <jhasse@bixense.com> wrote:
On Fri, 11 Feb 2022, at 14:47, Richard Shaw wrote:
On Sat, Feb 5, 2022 at 2:39 PM Richard Shaw <hobbes1069@gmail.com> wrote:
So I'm trying to build a project that does have some nono instances of "using namespace std", however, I have removed them and I STILL get this error.

Is it possible for mingw to conflict with itself?!?!?

In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/msxml.h:25,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/urlmon.h:450,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/objbase.h:163,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/ole2.h:17,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/wtypes.h:13,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/winscard.h:10,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/windows.h:97,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/FL/Fl_Window.H:26,
                 from /usr/x86_64-w64-mingw32/sys-root/mingw/include/FL/Fl_Double_Window.H:25,
                 from ./include/lgbook.h:15,
                 from logger/logger.cxx:37:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/oaidl.h:579:5: error: reference to 'byte' is ambiguous
  579 |     byte *pRecord;
      |     ^~~~

I have removed the instance of it in logger.cxx and it does not exist in lgbook.h or in fltk AFAIKT...

What now? From what I can tell (and I'm no C/C++ expert) this problem was introduced in C++17 so perhaps building in C++14 will work around the issue but I can't seem to find a REAL fix.

So no one has seen this? Still looking for a workaround.

I've run into this in the past but it was due to using namespace std;

Yeah, I had a few instances of that, but in this case it's not being used in logger.cxx. It appears the MinGW headers are conflicting with themselves and they don't seem to want to admit the problem or fix it.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97484

Thanks,
Richard