've downloaded and installed dev-c++ several times on two different computers trying to get it to work. Each time, I get an error when trying to compile.
I click "New Project" and select a console application, C Project.
I don't change the default code at all:
include <stdio.h>
include <stdlib.h>
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
and click F9
I elect to save as "main.c"
I get the following error:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include"
The "PLEASE READ BEFORE POSTING A QUESTION" thread has a link to instructions on getting Dev-C++ to work on Vista.
You must certainly have done that, but also in that thread the "undefined reference to `__cpu_features_init'" message is explicitly mentioned in relation to having more than one GNU toolchain installed.
The problem of Dev-C++ failing to work correctly when other GNU toolchains is installed is a bug. Dev-C++ appends rather than prepends its paths to the PATH environment variable; which is really dumb because other tools in the path with the same executable names get executed instead, but it won't get fixed. As it happens the work-around to the problem is the same as that for getting Dev-C++ to work in Vista in any case so you should be good to go.
Personally I would suggest that all this messing around to get an ageing development tool to work on a new OS is somewhat a waste of effort. There are better tools available.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
've downloaded and installed dev-c++ several times on two different computers trying to get it to work. Each time, I get an error when trying to compile.
I click "New Project" and select a console application, C Project.
I don't change the default code at all:
include <stdio.h>
include <stdlib.h>
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
and click F9
I elect to save as "main.c"
I get the following error:
Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -c main.c -o main.o -I"C:/Dev-Cpp/include"
gcc.exe main.o -o "Project1.exe" -L"C:/Dev-Cpp/lib"
/mingw/lib/crt2.o(.text+0x167):crt1.c: undefined reference to `__cpu_features_init'
collect2: ld returned 1 exit status
make.exe: *** [Project1.exe] Error 1
Execution terminated
Any idea what the problem could be?
Sorry, this is in Windows Vista...
The "PLEASE READ BEFORE POSTING A QUESTION" thread has a link to instructions on getting Dev-C++ to work on Vista.
You must certainly have done that, but also in that thread the "undefined reference to `__cpu_features_init'" message is explicitly mentioned in relation to having more than one GNU toolchain installed.
The problem of Dev-C++ failing to work correctly when other GNU toolchains is installed is a bug. Dev-C++ appends rather than prepends its paths to the PATH environment variable; which is really dumb because other tools in the path with the same executable names get executed instead, but it won't get fixed. As it happens the work-around to the problem is the same as that for getting Dev-C++ to work in Vista in any case so you should be good to go.
Personally I would suggest that all this messing around to get an ageing development tool to work on a new OS is somewhat a waste of effort. There are better tools available.
Clifford
I had a similar problem and what i did was deleted all my other compilers i had downloaded indivdually and that solved it
Of course that would work, but may not be very helpful if you actually needed those other compilers!