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.

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\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.

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 >.<

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.