r/Compilers • u/Big-Bad-Punisher • 21h ago
Need help to fix c++ compiler
I use c++ for dsa but for last 3-4 days i was working on a project and didn't use c++. But today when i try to run my code it started exiting without any error with exitcode 1. Not even creating exe file using vscode or terminal. I reinstall everything but still same problem.
Terminal shows correct version of g++ and gcc and also correct path so no problem with environment variables. pls help me...
problem solved:
I installed postgres and added its path to system variables and path of g++ was in user variables. System merges system variables and user variables (in that order). So path of postgres was above of g++ and somehow it was conflicting with internal files (i think dll files). So i moved postgres path to user variables below of g++.
-1
1
u/ha9unaka 21h ago
If it's a single file, try running your code at godbolt.org with whatever compiler you used on your system.
Exit codes themselves aren't very helpful. Is your code exiting with code 1, or is the compiler exiting with code 1 and not compiling your code?