Блог пользователя ivanz

Автор ivanz, история, 5 лет назад, По-русски

Hello! I ran into a following problem. I downloaded Code::Blocks 20.03 MinGW version here. If I select C++14 and try to compile program using bits/stdc++ everything is OK.

But when I select C++17 a mistake occurs:

If I don't use bits/stdc++.h but include the libraries separately everything works with C++14 and with C++17. So the problem is exactly in this library. What I need to do to make bits/stdc++ working with C++17?

UPD: this helps:
#define _GLIBCXX_FILESYSTEM
#include <bits/stdc++.h>

  • Проголосовать: нравится
  • +29
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Hey, I would recommend you using VS Code as it comes easy to use, with many cool extension support and much larger community base.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится

Try selecting ISO instead of GNU? I used to use Code::Blocks way back in the day and ISO C++17 worked fine.

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +14 Проголосовать: не нравится

Use this to show that you already include <filesystem> that produce this complitation error:

#define _GLIBCXX_FILESYSTEM
#include <bits/stdc++.h>
»
4 года назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Thank you so much. This two-line code is working

#define _GLIBCXX_FILESYSTEM
#include <bits/stdc++.h>

Thank you ivanz