unneon / icie

Competitive programming IDE-as-a-VS-Code-plugin
https://marketplace.visualstudio.com/items?itemName=pustaczek.icie
Mozilla Public License 2.0
84 stars 11 forks source link

Compilation Error bug #41

Closed krsinghshubham closed 4 years ago

krsinghshubham commented 4 years ago

i am getting the following error:

compilation error; no match for 'operator!=' (operand types are 'std::filesystem::cxx11::path' and 'std::filesystem::cxx11::path')

this issue is only with this extension. ss-2 compilation error ss-1 compilation path

unneon commented 4 years ago

I've just checked and it seems to still work with a simpler template, so something must be different... Could this be something about your template? Does int main(){} compile? Does #include <bits/stdc++.h> int main(){} compile? Are you using the type the error message mentions (and does removing that part of the template help)? Does some value of "Icie: Compile: Cpp Standard" help? Does your code compile on say, Godbolt with gcc 8.1.0 and -std=c++17? Could you include the code you're trying to compile?

krsinghshubham commented 4 years ago

hi, just checked it with a simpler code from geeksforgeeks. same problem persisits. code:

// A school method based C++ program to // check if a number is prime

include <bits/stdc++.h>

using namespace std;

// function check whether a number // is prime or not bool isPrime(int n) { // Corner case if (n <= 1) return false;

// Check from 2 to n-1 
for (int i = 2; i < n; i++) 
    if (n % i == 0) 
        return false; 

return true; 

}

// Driver Program int main() { isPrime(11) ? cout << " true\n" : cout << " false\n"; return 0; }

krsinghshubham commented 4 years ago

update : extension is not working with #include <bits/stdc++.h> working fine with #include

how to resolve this ??

unneon commented 4 years ago

With #include <bits/stdc++.h> it fails with the same message for me too, so mystery solved. :) I forgot about this, but Windows doesn't like bits/stdc++.h for some inexplicable reasons. Just #include <iostream>, #include <vector> and everything else you need in your template instead.

krsinghshubham commented 4 years ago

i understand, but there are many stl functions working on their separate libraries and i am a big fan of stl. So...

  1. is there a comprehensive list of all the headers need to be included for proper functioning in case of absence of <bits/stdc++.h>

thanks anyways for this awesome extension. ❤

krsinghshubham commented 4 years ago

HI bro , i check with windows forums windows already fixed this problem for mingW. even the vscode official setup guide results into 0 failure because of the header. it might me because of some old dependencies being used in the extension. please fix.

unneon commented 4 years ago

This is a problem with MinGW, not with the extension - the extension pretty much only calls MinGW's g++.exe with a path to the source file and a path to the output. You just need to find and install a newer version of MinGW where this problem is fixed.

The list of all headers can be found at e.g. https://en.cppreference.com/w/cpp/header, though you probably won't need all of them.

krsinghshubham commented 4 years ago

but i am able to combine it manually using mingw only.

unneon commented 4 years ago

You probably did not use the -std=c++17 flag when compiling manually, since the error message mentions something from later standards. As I mentioned, you can use the "Icie: Compile: Cpp Standard" config option to change the C++ standard used.

krsinghshubham commented 4 years ago

aaah, solved. THANKS A TON MAN, GOD BLESS YOU.