Murk's blog

By Murk, history, 22 months ago, In English,

I don't know how to use <bits/stdc++.h> with clion so I could make it visible to the visual studio compiler I configured, can anyone help on that ?

 
 
 
 
  • Vote: I like it
  • -5
  • Vote: I do not like it

»
22 months ago, # |
  Vote: I like it +5 Vote: I do not like it

Visual Studio compiler does not have this library. In order to use it you need to use GCC compiler. You can do it using the MinGW, or Cygwin. More on this topic here.

  • »
    »
    22 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    thank you,I did install MinGW, But I keep getting this error whenever I build a project

    C:/PROGRA~2/MINGW-~1/I686-8~1.0-P/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h: In member function 'std::filesystem::__cxx11::path& std::filesystem::__cxx11::path::operator/=(const std::filesystem::__cxx11::path&)': C:/PROGRA~2/MINGW-~1/I686-8~1.0-P/mingw32/lib/gcc/i686-w64-mingw32/8.1.0/include/c++/bits/fs_path.h:237:47: error: no match for 'operator!=' (operand types are 'std::filesystem::__cxx11::path' and 'std::filesystem::__cxx11::path') ** || (__p.has_root_name() && __p.root_name() != root_name()))** ** ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~**

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I think you can create a file and name it as 'stdc++.h'.

  • »
    »
    22 months ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I already did that, but it is not recognized by the MSV compiler, I guess it has something to do with clion not fully supporting visual studio yet. beside, the bits/stdc++.h header is already working when using visual studio community

»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

the problem is appeared to be solved,I made another bits folder and copied the independent stdc++.h into it, and then I copied all headers included in MinGW bits folder (after renaming) into the the new bits one and the problem is solved for now, I hope someone provide another alternative for this foolish kinda solution

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

hey dude, i got the same problem with you.. it works after i change c++20 to c++14..