I'm trying to include gmpxx.h to use in my code.
It only throws this error after compiling:
gmpxx.h: No such file or directory | gcc
I installed GMP using MSYS, and by the looks of it, it did work, as I see the GMP headers in the include folder.
I added the include path to the C/C++ configurations as asked by errors such as:
please update your includePath
Anyway i wanted to write an update cuz i managed to make it work. (somewhat)
So i had a slight suspicion that the issue was the compiler.
The issue was that it was using another compiler from a mingw that i had installed previously and the mingw from msys didnt have gcc, which is why nothing happened when adding it to environment variables.
What fixed it was basically this:
(which i did based on this cuz of my suspicion: https://superuser.com/questions/1718287/cannot-find-g-after-msys2-install)
Open Control Panel >> System and security >> System >> Advanced system settings >> Environment variables and set
Add "C:\msys64\mingw64\bin" without quotes to the variables and make sure its on top of the other compiler path.
Now the reason i say somewhat:
I make the .exe file through terminal with "g++ -o test3.exe test3.cpp -LC:\msys64\mingw64\lib -LC:\msys64\mingw64\lib -lgmpxx -lgmp" and through that it currently works perfectly, it uses the library and all and the code is working as it should be.
Now simply running the code, i get errors in output about it not recognising all those terms from those libraries ("undefined reference to insert term"). Again i think its issue with settings, i just gotta figure out which ones, but at least it somewhat works and honestly it is good enough. Previously tho, before the fix, running the command gave me same errors but i could see that the path to compiler was different, now the compiler path seems to be the right one, just with the same undefined reference errors.
As for extensions i got "c/c++", "c/c++ extension pack", "c/c++ runner" and "code runner". One of these might be somehow interfering with it maybe, I just need to unmask the culprit scooby doo style.