Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Source file not compiled Dev C++

Tags:

c

dev-c++

I just installed Dev C++ and I am learning C programming. the code i used was

#include <stdio.h>    
int main()
{
  printf("Hello world");
  getch();
}

I saved it as a .c file. When I compile it works fine, but when I compile and run it says source file not compiled. So I googled buncha things and came across this video on youtube which shows you how to fix it. I also saw other forums on google which suggest the same thing... However, after doing whats asked, Now I can't even compile my code. I get this error

Compiler: Default compiler
Executing  C:\Dev-Cpp\bin\gcc.exe...
C:\Dev-Cpp\bin\gcc.exe "C:\Users\ubaid\Documents\C\Untitled1.c" -o "C:\Users\ubaid\Documents\C\Untitled1.exe"    -I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib" 
gcc.exe: Internal error: Aborted (program collect2)
Please submit a full bug report.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.

Execution terminated

I have also used what is asked on this link, and still no luck.. http://learntogeek.com/miscellaneous/solved-source-file-not-compiled-error-in-dev-cpp/

I am using windows 8

like image 519
BaidNation Avatar asked Jan 25 '13 03:01

BaidNation


People also ask

Why is my Dev-C++ not compiling?

Cant compile in DevC++ Please make sure that you have GNU Make and adjust Bin setting or system PATH enviroment variable and that make setting in Compiler Option contains correct filename,otherwise you will not be able to compile anything. First of all, you can try to re-install DevC++.

How do I compile a program in Dev-C++?

Go to the "Execute" menu and select "Compile" (or just press CTRL+F9). It is likely that you will get some kind of compiler or linker error the first time you attempt to compile a project. Syntax errors will be displayed in the "Compiler" tab at the bottom of the screen.

Can Dev-C++ compile C?

Q #3) Can dev-C++ compile C? Answer: Yes. Dev-C++ IDE allows us to write and compile C and C++ programs. As C++ is an enhanced version of C language, the C++ compiler can compile any program written in C language.


2 Answers

I was having this issue and fixed it by going to: C:\Dev-Cpp\libexec\gcc\mingw32\3.4.2 , then deleting collect2.exe

like image 128
James Avatar answered Oct 21 '22 02:10

James


Install new version of Dev c++. It works fine in Windows 8. It also supports 64 bit version.

Download link is http://sourceforge.net/projects/orwelldevcpp/ .

like image 25
Ramesh Avatar answered Oct 21 '22 04:10

Ramesh