Why do i get this error every time i try to compile an SDL source code?
D:\gcc installation problem, cannot exec `cc1': No such file or directory.
That's the ONLY error i get.
Why do i get this error every time i try to compile an SDL source code?
D:\gcc installation problem, cannot exec `cc1': No such file or directory.
That's the ONLY error i get.
, and were on the right track: this is not an SDL bug but a toolchain/configuration issue. The compiler driver is trying to launch its internal backend (the program usually named cc1) and failing — that means either the backend binary is missing/unreachable, the active gcc is not the one you think, or the build files contain an absolute path that no longer exists.
Quick, non-destructive diagnostics to run from a shell:
where gcc
gcc -v
gcc -print-prog-name=cc1
gcc -print-search-dirs where (Windows) shows which gcc.exe is being invoked. gcc -v prints the search locations and invoked commands. -print-prog-name=cc1 shows the exact program the driver will try to execute; if that path does not exist, the driver cannot start the backend. -print-search-dirs reveals directories searched for programs/libraries.Also search the project directory for absolute compiler paths or references to the backend name (use a recursive text search). If the build succeeds on other projects but fails here, the failing project often includes a custom makefile or config that overrides the compiler location.
If the backend binary is present but still not executed, check for permission or antivirus quarantine and for a mismatch between gcc.exe and its libexec layout. Two practical fixes: point the driver to the correct libexec with the GCC_EXEC_PREFIX environment variable, for example
set GCC_EXEC_PREFIX=C:\path\to\toolchain\libexec\ or reinstall a complete, up-to-date toolchain instead of an IDE-only package. Consider using a maintained distribution (MSYS2 or MinGW-w64) for reliable binaries and package management: MSYS2 | MinGW-w64 | GCC install docs.
These steps fill the gaps left by earlier advice: run the diagnostic commands, search project files for hard-coded paths, verify the backend binary presence and permissions, and either point the compiler at the correct libexec or install a full toolchain.
Jump to Post— Freaky_Chris 299Check that gcc is installed in that location... if it isnt then change your compiler to look for it where ever it is installed.
Chris
Jump to Post— Freaky_Chris 299Actually check yourself, go to D:\gcc and check that you can find cc1, my guess is you wont.
Then it depends which compiler you are using as to how you change it...so if needed please tell us
Chris
Jump to Post— Freaky_Chris 299Right first of all you should try and find the gcc folder, my guess is that its probably in Dev's default install location
C:\Dev-Cpp\Bin
Once you have found it, in dev do the following
Tools -> Compiler Options -> Directories -> Binaries -> Change D:\ to where ever the …
Jump to Post— grumpier 149When you install Dev-C++, at some point you need to specify a directory where it gets installed. Whenever you (or a batch script you're executing) refers to D:\gcc, you need to change it so it refers to the directory you installed dev-C++.
If you did install into d:\gcc, then …
Jump to Post— Freaky_Chris 299When you install Dev-C++, at some point you need to specify a directory where it gets installed. Whenever you (or a batch script you're executing) refers to D:\gcc, you need to change it so it refers to the directory you installed dev-C++.
If you did install into d:\gcc, then presumably …
Check that gcc is installed in that location... if it isnt then change your compiler to look for it where ever it is installed.
Chris
Erm....
Huh?
I'm new to C++.
How do i change my compiler to check where it is installed?
Actually check yourself, go to D:\gcc and check that you can find cc1, my guess is you wont.
Then it depends which compiler you are using as to how you change it...so if needed please tell us
Chris
I couldn't even find the \gcc folder.
And i'm using Dev-C++.
Right first of all you should try and find the gcc folder, my guess is that its probably in Dev's default install location
C:\Dev-Cpp\Bin
Once you have found it, in dev do the following
Tools -> Compiler Options -> Directories -> Binaries -> Change D:\ to where ever the file is (more than likely where i stated above)
Hope this help
When you install Dev-C++, at some point you need to specify a directory where it gets installed. Whenever you (or a batch script you're executing) refers to D:\gcc, you need to change it so it refers to the directory you installed dev-C++.
If you did install into d:\gcc, then presumably you or someone else have removed that directory. So you need to reinstall dev-c++.
Right first of all you should try and find the gcc folder, my guess is that its probably in Dev's default install location
Once you have found it, in dev do the following
Tools -> Compiler Options -> Directories -> Binaries -> Change D:\ to where ever the file is (more than likely where i stated above)
Hope this help
I couldn't find the gcc folder anywhere >.<
I searched for it on my harddrive.
But i still couldn't find it. :S
When you install Dev-C++, at some point you need to specify a directory where it gets installed. Whenever you (or a batch script you're executing) refers to D:\gcc, you need to change it so it refers to the directory you installed dev-C++.
If you did install into d:\gcc, then presumably you or someone else have removed that directory. So you need to reinstall dev-c++.
^^ grumpier has got the other solution there for you.
Re-install Dev-Cpp
oh wait.
i found a gcc file.
but it was an executable file.
but it still doesn't work when i link it to c\devcpp\bin >.<
hmmm..
i found a gcc folder, but it was located in the lib folder.
We could spend all day trying to get you to re-build all of the incorrect includes etc on Dev or you could just reinstall it, since my guess is, ALL of the include directories etc are out. A re-install would take no time at all and would solve it all.
Chris
damn it.
i reinstalled it in c\devcpp but it still wont work!
> Why do i get this error every time i try to compile an SDL source code?
What about other programs, like a nice simple "hello world"?
It seems to me that you've downloaded the smaller zip file, containing only the IDE, and not the larger zip file containing the IDE AND the compiler.
Without the compiler, the IDE is just a dumb text editor.
ok List all the include directories from Dev-Cpp and we can compare to what they should be
> Why do i get this error every time i try to compile an SDL source code?
What about other programs, like a nice simple "hello world"?It seems to me that you've downloaded the smaller zip file, containing only the IDE, and not the larger zip file containing the IDE AND the compiler.
Without the compiler, the IDE is just a dumb text editor.
it works fine to compile other stuff.
like opengl,console applications.
Very strange, that some programs compile fine, and the SDL can't even find the compiler.
Did you install it in the default place (c:\dev-cpp) ?
If not, then open the project file (.dev) in another text editor, and see if it has something dumb like
GCC=C:\Dev-cpp\bin
Also check the makefile.win using the same editor.
The makefile should just have the name of the compiler, not the path to it as well.
Very strange, that some programs compile fine, and the SDL can't even find the compiler.
Did you install it in the default place (c:\dev-cpp) ?
If not, then open the project file (.dev) in another text editor, and see if it has something dumb like
GCC=C:\Dev-cpp\binAlso check the makefile.win using the same editor.
The makefile should just have the name of the compiler, not the path to it as well.
I reinstalled it to dev-cpp hundreds of times.
But now i've installed it to c\devcPLUSPLUS instead.
But it still won't work >.<
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.